We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 42864a9 commit 7e9c9fcCopy full SHA for 7e9c9fc
pkg/util/admission/grant_coordinator.go
@@ -276,6 +276,11 @@ func (sgc *StoreGrantCoordinators) TryGetSnapshotQueueForStore(storeID roachpb.S
276
func (sgc *StoreGrantCoordinators) close() {
277
// closeCh can be nil in tests that never called SetPebbleMetricsProvider.
278
if sgc.closeCh != nil {
279
+ // Ensure that the goroutine has observed the close and will no longer
280
+ // call GetPebbleMetrics, since the engines will be closed soon after this
281
+ // method returns, and calling GetPebbleMetrics on closed engines is not
282
+ // permitted.
283
+ sgc.closeCh <- struct{}{}
284
close(sgc.closeCh)
285
}
286
0 commit comments