mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-30 15:22:07 +00: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
0b87f02602
commit
66f8fbbb32
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue