mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/{mergeset,storage}: make sure that getFlushToDiskDeadline() takes into account only in-memory parts
This commit is contained in:
parent
2a5b9ff782
commit
550d5c7ea4
2 changed files with 6 additions and 6 deletions
|
@ -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 a new issue