diff options
author | Arne Juul <arnej@verizonmedia.com> | 2021-02-15 13:55:04 +0000 |
---|---|---|
committer | Arne Juul <arnej@verizonmedia.com> | 2021-02-15 14:16:21 +0000 |
commit | af9d59c3fece374c5fe61575c67ad49ac5f84bb4 (patch) | |
tree | a1851a855e22e406f877bfb405e192232ec1e137 /searchcorespi | |
parent | 805a313df05d2f347af321511527e06ea3cae92c (diff) |
use size literals in searchcore
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(); |