Remove some unused variables and lambda captures
Reviewers: mferencevic, mislav.bradac Reviewed By: mislav.bradac Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D832
This commit is contained in:
@@ -74,7 +74,7 @@ void GraphDbAccessor::BuildIndex(const GraphDbTypes::Label &label,
|
||||
// on function exit switch the build_in_progress to false
|
||||
utils::OnScopeExit on_exit([this] {
|
||||
bool expected = true;
|
||||
bool success =
|
||||
[[maybe_unused]] bool success =
|
||||
db_.index_build_in_progress_.compare_exchange_strong(expected, false);
|
||||
debug_assert(success, "BuildIndexInProgress flag was not set during build");
|
||||
});
|
||||
|
||||
@@ -155,7 +155,8 @@ static void Refresh(
|
||||
indices_entries_accessor.insert(
|
||||
TIndexEntry(indices_entry, new_record));
|
||||
|
||||
auto success = indices_entries_accessor.remove(indices_entry);
|
||||
[[maybe_unused]] auto success =
|
||||
indices_entries_accessor.remove(indices_entry);
|
||||
debug_assert(success, "Unable to delete entry.");
|
||||
}
|
||||
|
||||
|
||||
@@ -14,15 +14,15 @@ TEST(SkipList, HangDuringFindOrLarger) {
|
||||
const int num_of_threads = 8;
|
||||
const int iter = 100000;
|
||||
for (int i = 0; i < num_of_threads; ++i) {
|
||||
threads.emplace_back([&iter, &skiplist]() {
|
||||
threads.emplace_back([&skiplist]() {
|
||||
auto accessor = skiplist.access();
|
||||
for (int i = 0; i < iter; ++i) accessor.insert(rand() % 3);
|
||||
});
|
||||
threads.emplace_back([&iter, &skiplist]() {
|
||||
threads.emplace_back([&skiplist]() {
|
||||
auto accessor = skiplist.access();
|
||||
for (int i = 0; i < iter; ++i) accessor.remove(rand() % 3);
|
||||
});
|
||||
threads.emplace_back([&iter, &skiplist]() {
|
||||
threads.emplace_back([&skiplist]() {
|
||||
auto accessor = skiplist.access();
|
||||
for (int i = 0; i < iter; ++i)
|
||||
accessor.find_or_larger(rand() % 3);
|
||||
|
||||
Reference in New Issue
Block a user