mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-13 06:47:28 -08:00
Remove leftover signaling channels from headBlock
This commit is contained in:
parent
51ea34d381
commit
e0b33a7a28
7
head.go
7
head.go
|
@ -55,10 +55,6 @@ type headBlock struct {
|
||||||
|
|
||||||
metamtx sync.RWMutex
|
metamtx sync.RWMutex
|
||||||
meta BlockMeta
|
meta BlockMeta
|
||||||
|
|
||||||
updatec chan struct{}
|
|
||||||
stopc chan struct{}
|
|
||||||
donec chan struct{}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func createHeadBlock(dir string, seq int, l log.Logger, mint, maxt int64) (*headBlock, error) {
|
func createHeadBlock(dir string, seq int, l log.Logger, mint, maxt int64) (*headBlock, error) {
|
||||||
|
@ -141,9 +137,6 @@ func (h *headBlock) inBounds(t int64) bool {
|
||||||
|
|
||||||
// Close syncs all data and closes underlying resources of the head block.
|
// Close syncs all data and closes underlying resources of the head block.
|
||||||
func (h *headBlock) Close() error {
|
func (h *headBlock) Close() error {
|
||||||
close(h.stopc)
|
|
||||||
<-h.donec
|
|
||||||
|
|
||||||
// Lock mutex and leave it locked so we panic if there's a bug causing
|
// Lock mutex and leave it locked so we panic if there's a bug causing
|
||||||
// the block to be used afterwards.
|
// the block to be used afterwards.
|
||||||
h.mtx.Lock()
|
h.mtx.Lock()
|
||||||
|
|
Loading…
Reference in a new issue