mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 00:13:30 +01:00
lib/storage: do not take into account -storage.minFreeDiskSpaceBytes during background merges
This commit is contained in:
parent
cf1d2f289b
commit
2e43cd9d62
@ -978,10 +978,9 @@ func SetFinalMergeDelay(delay time.Duration) {
|
||||
|
||||
func getMaxOutBytes(path string, workersCount int) uint64 {
|
||||
n := fs.MustGetFreeSpace(path)
|
||||
if n < freeDiskSpaceLimitBytes {
|
||||
return 0
|
||||
}
|
||||
n -= freeDiskSpaceLimitBytes
|
||||
// Do not substract freeDiskSpaceLimitBytes from n before calculating the maxOutBytes,
|
||||
// since this will result in sub-optimal merges - e.g. many small parts will be left unmerged.
|
||||
|
||||
// Divide free space by the max number concurrent merges.
|
||||
maxOutBytes := n / uint64(workersCount)
|
||||
if maxOutBytes > maxBigPartSize {
|
||||
|
Loading…
Reference in New Issue
Block a user