aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-03-10 11:09:35 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2023-03-10 11:09:35 +0000
commit767c14b53fd4793c7da83f35d42c0e3229ef55e4 (patch)
treebec181a0f70a5af326dc212d98cef3e4c55c582e /vespalib
parent1a64278133d59acdb80c02a632a713ec95fd74a5 (diff)
Compacting is only checked during move in write thread
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/btree/btreenodeallocator.h2
-rw-r--r--vespalib/src/vespa/vespalib/btree/btreenodestore.h2
-rw-r--r--vespalib/src/vespa/vespalib/datastore/datastore.h2
-rw-r--r--vespalib/src/vespa/vespalib/datastore/entryref.h4
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);