8000 use a lock when calling unload · arangodb/arangodb@2293455 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2293455

Browse files
committed
use a lock when calling unload
1 parent 35eaf32 commit 2293455

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arangod/RocksDBEngine/RocksDBCollection.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,12 @@ void RocksDBCollection::load() {
202202
}
203203

204204
void RocksDBCollection::unload() {
205+
WRITE_LOCKER(guard, _exclusiveLock);
205206
if (useCache()) {
206207
destroyCache();
207208
TRI_ASSERT(!_cachePresent);
208209
}
209-
READ_LOCKER(guard, _indexesLock);
210+
READ_LOCKER(indexGuard, _indexesLock);
210211
for (auto it : _indexes) {
211212
it->unload();
212213
}

0 commit comments

Comments
 (0)
0