aboutsummaryrefslogtreecommitdiffstats
path: root/searchcorespi
diff options
context:
space:
mode:
Diffstat (limited to 'searchcorespi')
-rw-r--r--searchcorespi/src/vespa/searchcorespi/index/indexflushtarget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexflushtarget.cpp b/searchcorespi/src/vespa/searchcorespi/index/indexflushtarget.cpp
index 10779446368..bbd8e9ee35f 100644
--- a/searchcorespi/src/vespa/searchcorespi/index/indexflushtarget.cpp
+++ b/searchcorespi/src/vespa/searchcorespi/index/indexflushtarget.cpp
@@ -1,6 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "indexflushtarget.h"
+#include <vespa/vespalib/util/size_literals.h>
#include <vespa/log/log.h>
LOG_SETUP(".searchcorespi.index.indexflushtarget");
@@ -41,9 +42,8 @@ IndexFlushTarget::needUrgentFlush() const
{
// Due to limitation of 16G address space of single datastore
// TODO: Even better if urgency was decided by memory index itself.
- constexpr int64_t G = 1024*1024*1024l;
bool urgent = (_numFrozenMemoryIndexes > _maxFrozenMemoryIndexes) ||
- (getApproxMemoryGain().gain() > 16*G);
+ (getApproxMemoryGain().gain() > ssize_t(16_Gi));
SerialNum flushedSerial = _indexMaintainer.getFlushedSerialNum();
LOG(debug, "Num frozen: %u Memory gain: %" PRId64 " Urgent: %d, flushedSerial=%" PRIu64,
_numFrozenMemoryIndexes, getApproxMemoryGain().gain(), static_cast<int>(urgent), flushedSerial);