1
0
Fork 0

Fixing locking error

This commit is contained in:
Simon Grätzer 2017-05-11 15:55:06 +02:00
parent d0b65f2945
commit 310166d3cf
3 changed files with 5 additions and 2 deletions

View File

@ -544,6 +544,9 @@ bool RocksDBCollection::dropIndex(TRI_idx_iid_t iid) {
_indexes.erase(_indexes.begin() + i);
events::DropIndex("", std::to_string(iid), TRI_ERROR_NO_ERROR);
// toVelocyPackIgnore will take a read lock and we don't need the
// lock anymore, we will always return
guard.unlock();
VPackBuilder builder = _logicalCollection->toVelocyPackIgnore(
{"path", "statusString"}, true);

View File

@ -130,7 +130,7 @@ bool RocksDBEdgeIndexIterator::next(TokenCallback const& cb, size_t limit) {
foundInCache = true;
} else {
// try to find cached value
auto f = _cache->find(fromTo.data(),fromTo.size());
auto f = _cache->find(fromTo.data(), (uint32_t)fromTo.size());
foundInCache = f.found();
if (foundInCache) {
VPackSlice cachedPrimaryKeys(f.value()->value());

View File

@ -197,7 +197,7 @@ void RocksDBIndex::blackListKey(char const* data, std::size_t len){
bool blacklisted = false;
uint64_t attempts = 0;
while (!blacklisted) {
blacklisted = _cache->blacklist(data,len);
blacklisted = _cache->blacklist(data, (uint32_t)len);
if (attempts++ % 10 == 0) {
if (_cache->isShutdown()) {
disableCache();