mirror of https://gitee.com/bigwinds/arangodb
Fixing locking error
This commit is contained in:
parent
d0b65f2945
commit
310166d3cf
|
@ -544,6 +544,9 @@ bool RocksDBCollection::dropIndex(TRI_idx_iid_t iid) {
|
||||||
|
|
||||||
_indexes.erase(_indexes.begin() + i);
|
_indexes.erase(_indexes.begin() + i);
|
||||||
events::DropIndex("", std::to_string(iid), TRI_ERROR_NO_ERROR);
|
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(
|
VPackBuilder builder = _logicalCollection->toVelocyPackIgnore(
|
||||||
{"path", "statusString"}, true);
|
{"path", "statusString"}, true);
|
||||||
|
|
|
@ -130,7 +130,7 @@ bool RocksDBEdgeIndexIterator::next(TokenCallback const& cb, size_t limit) {
|
||||||
foundInCache = true;
|
foundInCache = true;
|
||||||
} else {
|
} else {
|
||||||
// try to find cached value
|
// 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();
|
foundInCache = f.found();
|
||||||
if (foundInCache) {
|
if (foundInCache) {
|
||||||
VPackSlice cachedPrimaryKeys(f.value()->value());
|
VPackSlice cachedPrimaryKeys(f.value()->value());
|
||||||
|
|
|
@ -197,7 +197,7 @@ void RocksDBIndex::blackListKey(char const* data, std::size_t len){
|
||||||
bool blacklisted = false;
|
bool blacklisted = false;
|
||||||
uint64_t attempts = 0;
|
uint64_t attempts = 0;
|
||||||
while (!blacklisted) {
|
while (!blacklisted) {
|
||||||
blacklisted = _cache->blacklist(data,len);
|
blacklisted = _cache->blacklist(data, (uint32_t)len);
|
||||||
if (attempts++ % 10 == 0) {
|
if (attempts++ % 10 == 0) {
|
||||||
if (_cache->isShutdown()) {
|
if (_cache->isShutdown()) {
|
||||||
disableCache();
|
disableCache();
|
||||||
|
|
Loading…
Reference in New Issue