diff --git a/pkg/jobs/jobspb/BUILD.bazel b/pkg/jobs/jobspb/BUILD.bazel index f8711fbe08e4..1a583087a505 100644 --- a/pkg/jobs/jobspb/BUILD.bazel +++ b/pkg/jobs/jobspb/BUILD.bazel @@ -41,7 +41,6 @@ go_proto_library( visibility = ["//visibility:public"], deps = [ "//pkg/ccl/streamingccl", # keep - "//pkg/ccl/streamingccl/streamclient", # keep "//pkg/roachpb", "//pkg/security", # keep "//pkg/sql/catalog/descpb", diff --git a/pkg/sql/execinfrapb/BUILD.bazel b/pkg/sql/execinfrapb/BUILD.bazel index 91caa9a412b2..87918f0b985a 100644 --- a/pkg/sql/execinfrapb/BUILD.bazel +++ b/pkg/sql/execinfrapb/BUILD.bazel @@ -41,7 +41,6 @@ go_library( visibility = ["//visibility:public"], deps = [ "//pkg/base", - "//pkg/ccl/streamingccl/streamclient", # keep "//pkg/roachpb", "//pkg/rpc", "//pkg/security", diff --git a/pkg/util/stop/stopper.go b/pkg/util/stop/stopper.go index 1ef13d5439e8..ab498658f406 100644 --- a/pkg/util/stop/stopper.go +++ b/pkg/util/stop/stopper.go @@ -247,12 +247,11 @@ func (s *Stopper) Recover(ctx context.Context) { func (s *Stopper) AddCloser(c Closer) { s.mu.Lock() defer s.mu.Unlock() - select { - case <-s.stopped: + if s.mu.stopCalled { c.Close() - default: - s.mu.closers = append(s.mu.closers, c) + return } + s.mu.closers = append(s.mu.closers, c) } // WithCancelOnQuiesce returns a child context which is canceled when the