diff options
Diffstat (limited to 'searchcorespi')
-rw-r--r-- | searchcorespi/src/vespa/searchcorespi/index/indexflushtarget.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexflushtarget.cpp b/searchcorespi/src/vespa/searchcorespi/index/indexflushtarget.cpp index 8ae6e18a28a..dc7798dd478 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,7 +42,7 @@ 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; + constexpr int64_t G =1_Gi; bool urgent = (_numFrozenMemoryIndexes > _maxFrozenMemoryIndexes) || (getApproxMemoryGain().gain() > 16*G); SerialNum flushedSerial = _indexMaintainer.getFlushedSerialNum(); |