mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 07:19:17 +01:00
lib/{mergeset,storage}: make sure that getFlushToDiskDeadline() takes into account only in-memory parts
This commit is contained in:
parent
f75b1b7a53
commit
8846ce5f1d
@ -1168,9 +1168,9 @@ func (tb *Table) mergeParts(pws []*partWrapper, stopCh <-chan struct{}, isFinal
|
||||
}
|
||||
|
||||
func getFlushToDiskDeadline(pws []*partWrapper) time.Time {
|
||||
d := pws[0].flushToDiskDeadline
|
||||
for _, pw := range pws[1:] {
|
||||
if pw.flushToDiskDeadline.Before(d) {
|
||||
d := time.Now().Add(dataFlushInterval)
|
||||
for _, pw := range pws {
|
||||
if pw.mp != nil && pw.flushToDiskDeadline.Before(d) {
|
||||
d = pw.flushToDiskDeadline
|
||||
}
|
||||
}
|
||||
|
@ -1353,9 +1353,9 @@ func (pt *partition) mergeParts(pws []*partWrapper, stopCh <-chan struct{}, isFi
|
||||
}
|
||||
|
||||
func getFlushToDiskDeadline(pws []*partWrapper) time.Time {
|
||||
d := pws[0].flushToDiskDeadline
|
||||
for _, pw := range pws[1:] {
|
||||
if pw.flushToDiskDeadline.Before(d) {
|
||||
d := time.Now().Add(dataFlushInterval)
|
||||
for _, pw := range pws {
|
||||
if pw.mp != nil && pw.flushToDiskDeadline.Before(d) {
|
||||
d = pw.flushToDiskDeadline
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user