Skip to content

Commit

Permalink
colflow: temporarily disable test assertion about closers
Browse files Browse the repository at this point in the history
Release note: None
  • Loading branch information
yuzefovich committed Nov 14, 2022
1 parent 6011870 commit 4e6730e
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions pkg/sql/colflow/vectorized_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,17 +384,18 @@ func (f *vectorizedFlow) Cleanup(ctx context.Context) {
// This cleans up all the memory and disk monitoring of the vectorized flow.
f.creator.cleanup(ctx)

if buildutil.CrdbTestBuild && f.FlowBase.Started() && !f.FlowCtx.EvalCtx.SessionData().TestingVectorizeInjectPanics {
// Check that all closers have been closed. Note that we don't check
// this in case the flow was never started in the first place (it is ok
// to not check this since closers haven't allocated any resources in
// such a case). We also don't check when the panic injection is
// enabled since then Close() might be legitimately not called (if a
// panic is injected in Init() of the wrapped operator).
if numClosed := atomic.LoadInt32(f.testingInfo.numClosed); numClosed != f.testingInfo.numClosers {
colexecerror.InternalError(errors.AssertionFailedf("expected %d components to be closed, but found that only %d were", f.testingInfo.numClosers, numClosed))
}
}
// TODO(yuzefovich): uncomment this once the assertion is no longer flaky.
//if buildutil.CrdbTestBuild && f.FlowBase.Started() && !f.FlowCtx.EvalCtx.SessionData().TestingVectorizeInjectPanics {
// // Check that all closers have been closed. Note that we don't check
// // this in case the flow was never started in the first place (it is ok
// // to not check this since closers haven't allocated any resources in
// // such a case). We also don't check when the panic injection is
// // enabled since then Close() might be legitimately not called (if a
// // panic is injected in Init() of the wrapped operator).
// if numClosed := atomic.LoadInt32(f.testingInfo.numClosed); numClosed != f.testingInfo.numClosers {
// colexecerror.InternalError(errors.AssertionFailedf("expected %d components to be closed, but found that only %d were", f.testingInfo.numClosers, numClosed))
// }
//}

f.tempStorage.Lock()
created := f.tempStorage.path != ""
Expand Down

0 comments on commit 4e6730e

Please sign in to comment.