diff options
author | Tor Egge <Tor.Egge@online.no> | 2022-04-21 20:51:31 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2022-04-21 20:51:31 +0200 |
commit | d5d161ea30459ecb984f22391b1689ab8c0bd557 (patch) | |
tree | d224dc7d41e9e2127d961d869c20cd0292e2acce /vespalib | |
parent | 9753948560485faf82092ca858384f4dacd6c453 (diff) |
Block compaction while buffers are held.
Diffstat (limited to 'vespalib')
3 files changed, 4 insertions, 3 deletions
diff --git a/vespalib/src/vespa/vespalib/datastore/array_store.h b/vespalib/src/vespa/vespalib/datastore/array_store.h index ed3af451b04..30e0c3ab91f 100644 --- a/vespalib/src/vespa/vespalib/datastore/array_store.h +++ b/vespalib/src/vespa/vespalib/datastore/array_store.h @@ -105,6 +105,7 @@ public: const BufferState &bufferState(EntryRef ref) const; bool has_free_lists_enabled() const { return _store.has_free_lists_enabled(); } + bool has_held_buffers() const noexcept { return _store.has_held_buffers(); } static ArrayStoreConfig optimizedConfigForHugePage(size_t maxSmallArraySize, size_t hugePageSize, diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store.h b/vespalib/src/vespa/vespalib/datastore/unique_store.h index 81034ab4210..e7c374985a7 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store.h @@ -67,7 +67,7 @@ public: Allocator& get_allocator() { return _allocator; } const Allocator& get_allocator() const { return _allocator; } IUniqueStoreDictionary& get_dictionary() { return *_dict; } - inline const DataStoreType& get_data_store() const { return _allocator.get_data_store(); } + inline const DataStoreType& get_data_store() const noexcept { return _allocator.get_data_store(); } // Pass on hold list management to underlying store void transferHoldLists(generation_t generation); diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_allocator.h b/vespalib/src/vespa/vespalib/datastore/unique_store_allocator.h index 025165ee0e0..04df88ab4b9 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store_allocator.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store_allocator.h @@ -43,8 +43,8 @@ public: const EntryType& get(EntryRef ref) const { return get_wrapped(ref).value(); } - DataStoreType& get_data_store() { return _store; } - const DataStoreType& get_data_store() const { return _store; } + DataStoreType& get_data_store() noexcept { return _store; } + const DataStoreType& get_data_store() const noexcept { return _store; } }; } |