lib/logstorage: fix free space check

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
This commit is contained in:
Zakhar Bessarab 2023-10-03 14:36:35 +04:00
parent 612ec2df6b
commit 650d72f336
No known key found for this signature in database
GPG Key ID: 932B34D6FE062023

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() {