diff options
Diffstat (limited to 'vespalib')
4 files changed, 5 insertions, 5 deletions
diff --git a/vespalib/src/vespa/vespalib/btree/btreenodeallocator.h b/vespalib/src/vespa/vespalib/btree/btreenodeallocator.h index 3fa5f1188cd..784e95e3817 100644 --- a/vespalib/src/vespa/vespalib/btree/btreenodeallocator.h +++ b/vespalib/src/vespa/vespalib/btree/btreenodeallocator.h @@ -163,7 +163,7 @@ public: vespalib::string toString(BTreeNode::Ref ref) const; vespalib::string toString(const BTreeNode * node) const; - bool getCompacting(EntryRef ref) const { return _nodeStore.getCompacting(ref); } + bool getCompacting(EntryRef ref) { return _nodeStore.getCompacting(ref); } std::unique_ptr<vespalib::datastore::CompactingBuffers> start_compact_worst(const CompactionStrategy& compaction_strategy) { return _nodeStore.start_compact_worst(compaction_strategy); } diff --git a/vespalib/src/vespa/vespalib/btree/btreenodestore.h b/vespalib/src/vespa/vespalib/btree/btreenodestore.h index 8fef0185674..73e68c3579f 100644 --- a/vespalib/src/vespa/vespalib/btree/btreenodestore.h +++ b/vespalib/src/vespa/vespalib/btree/btreenodestore.h @@ -182,7 +182,7 @@ public: } // Inherit doc from DataStoreT - bool getCompacting(EntryRef ref) const { + bool getCompacting(EntryRef ref) { return _store.getCompacting(ref); } diff --git a/vespalib/src/vespa/vespalib/datastore/datastore.h b/vespalib/src/vespa/vespalib/datastore/datastore.h index f0ca9c90700..01b81d0fa58 100644 --- a/vespalib/src/vespa/vespalib/datastore/datastore.h +++ b/vespalib/src/vespa/vespalib/datastore/datastore.h @@ -49,7 +49,7 @@ public: void reclaim_all_entry_refs() override; - bool getCompacting(EntryRef ref) const { + bool getCompacting(EntryRef ref) { return getBufferState(RefType(ref).bufferId()).getCompacting(); } diff --git a/vespalib/src/vespa/vespalib/datastore/entryref.h b/vespalib/src/vespa/vespalib/datastore/entryref.h index a0016f4fdcb..752d660a097 100644 --- a/vespalib/src/vespa/vespalib/datastore/entryref.h +++ b/vespalib/src/vespa/vespalib/datastore/entryref.h @@ -38,8 +38,8 @@ public: EntryRefT(const EntryRef & ref_) noexcept : EntryRef(ref_.ref()) {} size_t offset() const noexcept { return _ref & (offsetSize() - 1); } uint32_t bufferId() const noexcept { return _ref >> OffsetBits; } - static size_t offsetSize() noexcept { return 1ul << OffsetBits; } - static uint32_t numBuffers() noexcept { return 1 << BufferBits; } + static constexpr size_t offsetSize() noexcept { return 1ul << OffsetBits; } + static constexpr uint32_t numBuffers() noexcept { return 1 << BufferBits; } }; vespalib::asciistream& operator<<(vespalib::asciistream& os, const EntryRef& ref); |