mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +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
f67427ae61
commit
d666755159
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