mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 07:19:17 +01:00
lib/storage: do not remove parts outside the configured retention if they are currently merged
These parts are automatically removed after the merge is complete.
This commit is contained in:
parent
9df60518bb
commit
9e4ed5e591
@ -1324,13 +1324,13 @@ func (pt *partition) removeStaleParts() {
|
||||
|
||||
pt.partsLock.Lock()
|
||||
for _, pw := range pt.bigParts {
|
||||
if pw.p.ph.MaxTimestamp < retentionDeadline {
|
||||
if !pw.isInMerge && pw.p.ph.MaxTimestamp < retentionDeadline {
|
||||
atomic.AddUint64(&pt.bigRowsDeleted, pw.p.ph.RowsCount)
|
||||
m[pw] = true
|
||||
}
|
||||
}
|
||||
for _, pw := range pt.smallParts {
|
||||
if pw.p.ph.MaxTimestamp < retentionDeadline {
|
||||
if !pw.isInMerge && pw.p.ph.MaxTimestamp < retentionDeadline {
|
||||
atomic.AddUint64(&pt.smallRowsDeleted, pw.p.ph.RowsCount)
|
||||
m[pw] = true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user