diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-03-10 11:09:35 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-03-10 11:09:35 +0000 |
commit | 767c14b53fd4793c7da83f35d42c0e3229ef55e4 (patch) | |
tree | bec181a0f70a5af326dc212d98cef3e4c55c582e | |
parent | 1a64278133d59acdb80c02a632a713ec95fd74a5 (diff) |
Compacting is only checked during move in write thread
6 files changed, 7 insertions, 9 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/reference_attribute_saver.h b/searchlib/src/vespa/searchlib/attribute/reference_attribute_saver.h index c413d01c386..deddc9980ec 100644 --- a/searchlib/src/vespa/searchlib/attribute/reference_attribute_saver.h +++ b/searchlib/src/vespa/searchlib/attribute/reference_attribute_saver.h @@ -43,7 +43,7 @@ public: EntryRefVector&& indices, const Store &store); - virtual ~ReferenceAttributeSaver(); + ~ReferenceAttributeSaver() override; }; } diff --git a/searchlib/src/vespa/searchlib/bitcompression/compression.h b/searchlib/src/vespa/searchlib/bitcompression/compression.h index 7c5ba3e94ca..a77d82d9e8f 100644 --- a/searchlib/src/vespa/searchlib/bitcompression/compression.h +++ b/searchlib/src/vespa/searchlib/bitcompression/compression.h @@ -1248,9 +1248,7 @@ public: void setReadContext(search::ComprFileReadContext *readContext) { _readContext = readContext; } - search::ComprFileReadContext *getReadContext() const { - return _readContext; - } + void readComprBuffer() { _readContext->readComprBuffer(); } 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); |