summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@yahooinc.com>2022-03-17 12:52:46 +0100
committerTor Egge <Tor.Egge@yahooinc.com>2022-03-17 12:52:46 +0100
commit0f7ea6e2fc299d13266deb5c4c51622eb6128183 (patch)
tree986d842c267ef0ba93b6162a2d88aa4237cf41ec /vespalib
parent791812f39d990fb75c11cccb72334b21bf220630 (diff)
Use AtomicEntryRef and AtomicValueWrapper<uint32_t> in reference attribute.
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/datastore/unique_store_remapper.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store_remapper.h b/vespalib/src/vespa/vespalib/datastore/unique_store_remapper.h
index 2501c4fafd9..47d52bf8991 100644
--- a/vespalib/src/vespa/vespalib/datastore/unique_store_remapper.h
+++ b/vespalib/src/vespa/vespalib/datastore/unique_store_remapper.h
@@ -46,6 +46,15 @@ public:
}
}
+ void remap(vespalib::ArrayRef<AtomicEntryRef> refs) const {
+ for (auto &atomic_ref : refs) {
+ auto ref = atomic_ref.load_relaxed();
+ if (ref.valid() && _compacting_buffer.has(ref)) {
+ atomic_ref.store_release(remap(ref));
+ }
+ }
+ }
+
const EntryRefFilter& get_entry_ref_filter() const noexcept { return _compacting_buffer; }
virtual void done() = 0;