Skip to content

Commit fa3792d

Browse files
authored
Merge pull request #36938 from vespa-engine/toregge/restrict-flush-orders-for-gc-targets
Don't select tls size or max age flush order due to gc flush targets MERGEOK.
2 parents df44e57 + 12617ca commit fa3792d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ FlushContext::List MemoryFlush::getFlushTargets(const FlushContext::List&
154154
// Don't consider TLSSIZE if there exists an active (ongoing) flush (for this flush handler)
155155
// that started before the last flush time of the flush target to evaluate.
156156
// Instead we should wait for the active (ongoing) flush to be finished before doing another evaluation.
157-
if (!oldest_start_time.has_value() || lastFlushTime < oldest_start_time.value()) {
157+
if ((!oldest_start_time.has_value() || lastFlushTime < oldest_start_time.value()) &&
158+
target.getType() != IFlushTarget::Type::GC) {
158159
if (visitedHandlers.insert(&handler).second) {
159160
totalTlsSize += tlsStats.getNumBytes();
160161
if ((totalTlsSize > config.maxGlobalTlsSize) && (order < TLSSIZE)) {
@@ -166,7 +167,8 @@ FlushContext::List MemoryFlush::getFlushTargets(const FlushContext::List&
166167
order = MEMORY;
167168
} else if ((dgain.gain() > config.diskBloatFactor * computeGain(dgain)) && (order < DISKBLOAT)) {
168169
order = DISKBLOAT;
169-
} else if ((timeDiff >= config.maxTimeGain) && (order < MAXAGE)) {
170+
} else if ((timeDiff >= config.maxTimeGain) && (order < MAXAGE) &&
171+
target.getType() != IFlushTarget::Type::GC) {
170172
order = MAXAGE;
171173
}
172174
LOG(debug,

0 commit comments

Comments
 (0)