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