You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To reduce object allocation in the point get, I aggressively reuse the objects.
When I try to reuse the StatementContext in #26007, I found some problem.
In the past, SetProcessInfo() get a snapshot of the process info:
This is a shallow copy, when ResetContextStmt() create objects, the pi referred objects are never touched again.
But if I reuse those object, the pi will be modified too! It's not a real snapshot any more.
So we can not reuse the old StmtCtx is the a new statement .... the pi is still referencing it.
The text was updated successfully, but these errors were encountered:
Hmm, I think the PR could be reopened after solving the issue. My first idea is to provide a Clone for StmtCtx, and remove RuntimeStatsColl in the processinfo.
Enhancement
To reduce object allocation in the point get, I aggressively reuse the objects.
When I try to reuse the
StatementContext
in #26007, I found some problem.In the past,
SetProcessInfo()
get a snapshot of the process info:This is a shallow copy, when
ResetContextStmt()
create objects, thepi
referred objects are never touched again.But if I reuse those object, the
pi
will be modified too! It's not a real snapshot any more.So we can not reuse the old
StmtCtx
is the a new statement .... thepi
is still referencing it.The text was updated successfully, but these errors were encountered: