mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 12:31:07 +01:00
lib/storage: take into account -storage.minFreeDiskSpaceBytes
when performing big merges
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/269
This commit is contained in:
parent
f67427ae61
commit
d666755159
@ -978,6 +978,10 @@ func SetFinalMergeDelay(delay time.Duration) {
|
||||
|
||||
func getMaxOutBytes(path string, workersCount int) uint64 {
|
||||
n := fs.MustGetFreeSpace(path)
|
||||
if n < freeDiskSpaceLimitBytes {
|
||||
return 0
|
||||
}
|
||||
n -= freeDiskSpaceLimitBytes
|
||||
// Divide free space by the max number concurrent merges.
|
||||
maxOutBytes := n / uint64(workersCount)
|
||||
if maxOutBytes > maxBigPartSize {
|
||||
|
Loading…
Reference in New Issue
Block a user