We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 848b291 + 059915d commit 391aaefCopy full SHA for 391aaef
pkg/sql/distsql/server.go
@@ -620,6 +620,10 @@ func (ds *ServerImpl) SetupFlow(
620
// Note: the passed context will be canceled when this RPC completes, so we
621
// can't associate it with the flow since it outlives the RPC.
622
ctx = ds.AnnotateCtx(context.Background())
623
+ // Ensure that the flow respects the node being shut down. Note that since
624
+ // the flow outlives the RPC, we cannot defer the cancel function, so we
625
+ // simply ignore it.
626
+ ctx, _ = ds.Stopper.WithCancelOnQuiesce(ctx)
627
if err := func() error {
628
// Reserve some memory for this remote flow which is a poor man's
629
// admission control based on the RAM usage.
0 commit comments