summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2022-05-25 15:37:01 +0200
committerTor Egge <Tor.Egge@online.no>2022-05-25 15:37:01 +0200
commit33bce06b2773efeb50bd7b27faf5595e800d9e57 (patch)
tree9c419670e7a711d5a96acf3a42cea1dcea60e90b /searchcore
parent2656098f025f9efbb91e0a06feb66d8d9a0f2997 (diff)
Use atomic id counter for iterator ids.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp b/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp
index 7e9f763a758..5a0bcb1cd41 100644
--- a/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp
+++ b/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp
@@ -527,7 +527,7 @@ PersistenceEngine::createIterator(const Bucket &bucket, FieldSetSP fields, const
entry->handler_sequence = HandlerSnapshot::release(std::move(snapshot));
std::lock_guard<std::mutex> guard(_iterators_lock);
- static IteratorId id_counter(0);
+ static std::atomic<IteratorId::Type> id_counter(0);
IteratorId id(++id_counter);
_iterators[id] = entry.release();
return CreateIteratorResult(id);