lib/logstorage: fix free space check (#5113)

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
This commit is contained in:
Zakhar Bessarab 2023-10-03 14:39:41 +04:00 committed by Aliaksandr Valialkin
parent c0b478d47f
commit 85b604d414
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1

View File

@ -541,7 +541,7 @@ func (s *Storage) UpdateStats(ss *StorageStats) {
// IsReadOnly returns true if s is in read-only mode.
func (s *Storage) IsReadOnly() bool {
available := fs.MustGetFreeSpace(s.path)
return available > s.minFreeDiskSpaceBytes
return available < s.minFreeDiskSpaceBytes
}
func (s *Storage) debugFlush() {