Fix utils::SkipList const iterator bug
Summary: This issue was already fixed in D2119 for the iterator, but I missed to fix the const iterator in that diff... Reviewers: teon.banek Reviewed By: teon.banek Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D2703
This commit is contained in:
parent
6e9404c89a
commit
000d6dba55
@ -575,9 +575,10 @@ class SkipList final {
|
||||
|
||||
ConstIterator &operator++() {
|
||||
while (true) {
|
||||
TNode *next = node_->nexts[0].load(std::memory_order_acquire);
|
||||
if (next == nullptr || !next->marked.load(std::memory_order_acquire)) {
|
||||
node_ = next;
|
||||
node_ = node_->nexts[0].load(std::memory_order_acquire);
|
||||
if (node_ != nullptr && node_->marked.load(std::memory_order_acquire)) {
|
||||
continue;
|
||||
} else {
|
||||
return *this;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user