mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00: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
120fedf1ac
commit
71c0f7cce3
1 changed files with 4 additions and 0 deletions
|
@ -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 a new issue