Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distsql: restore EvalCtx.Mon on the flow cleanup #69483

Merged
merged 2 commits into from Aug 28, 2021

Commits on Aug 27, 2021

  1. distsql: restore EvalCtx.Mon on the flow cleanup

    In `setupFlow`, if we're setting up a flow on the gateway, we're using
    `LocalState` to save on deserialization of some state. Notably, we pass
    the eval context that we used during the physical planning. That eval
    context can be mutated (in particular, we're updating its `Mon` field to
    the "flow" memory monitor), and previously this could cause issues when
    automatically retrying stats collection jobs (possibly there could be
    other issues).
    
    This commit introduces a callback to restore the local eval context to
    its original state which is done on the flow cleanup.
    
    Release note (bug fix): Previously, table stats collection issued via
    `ANALYZE` statement or via `CREATE STATISTICS` statement without
    specifying `AS OF SYSTEM TIME` option could run into
    `flow: memory budget exceeded`, and this has been fixed.
    
    Release justification: fix to a long standing bug.
    yuzefovich committed Aug 27, 2021
    Configuration menu
    Copy the full SHA
    ea4b23f View commit details
    Browse the repository at this point in the history
  2. distsql: fix cleaning up resources in an error case in setupFlow

    Release note: None
    
    Release justification: low-risk improvement to resources' cleanup in an
    edge case.
    yuzefovich committed Aug 27, 2021
    Configuration menu
    Copy the full SHA
    cf8acbf View commit details
    Browse the repository at this point in the history