sql: persist planner
for a pausable portal
#99625
Labels
A-pausable-portals
Issues related to multiple active portals
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
We now store the meta data needed for a portal's re-execution in
PreparedPortal.portalPauseInfo
. This field includes things such asinstrumentationHelper
andplanTop
which are to override the planner for each execution. But this can be error-prone and confusing as now we reset most of the fields of a planner, even though the underlying query is the same.One more bullet-proof approach would be to embed planner object into the pause info struct, and then use that planner instance whenever we're operating with the pausable portals.
pauseInfo.planner
would be modified ("initialized") on the first execution of the portal, but then we will not callresetPlanner()
on it. This way, with every re-execution we will let the resumed flow to modify our planner as the flow needs, and then we'll keep the state of the planner unchanged until the portal is resumed again. This approach will also let us remove fields likeportal.pauseInfo.ihWrapper
.The key here is to determine what in planner should be retained and what should be updated for each execution.
Jira issue: CRDB-25987
Epic CRDB-25183
The text was updated successfully, but these errors were encountered: