Save disk space metrics immediately (#4740)

This commit is contained in:
Nikita Mochalov 2023-08-10 16:52:32 +03:00 committed by GitHub
parent e6a49dc533
commit 4b1ba7f5b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,6 +83,7 @@ func NewDiskLocation(dir string, maxVolumeCount int32, minFreeSpace util.MinFree
location.ecVolumes = make(map[needle.VolumeId]*erasure_coding.EcVolume)
location.closeCh = make(chan struct{})
go func() {
location.CheckDiskSpace()
for {
select {
case <-location.closeCh: