1
0
Fork 0

Fixed return value of cache rebalancer in a few spots. (#3967)

This commit is contained in:
Dan Larkin 2017-12-08 10:01:55 -05:00 committed by Jan
parent 635f11884a
commit 5e3b5526d0
2 changed files with 3 additions and 3 deletions

View File

@ -33,5 +33,5 @@ int Rebalancer::rebalance() {
if (_manager != nullptr) {
return _manager->rebalance();
}
return false;
return TRI_ERROR_INTERNAL;
}

View File

@ -317,8 +317,8 @@ TEST_CASE("cache with backing store", "[cache][!hide][longRunning]") {
bool doneRebalancing = false;
auto rebalanceWorker = [&rebalancer, &doneRebalancing]() -> void {
while (!doneRebalancing) {
bool rebalanced = rebalancer.rebalance();
if (rebalanced) {
int status = rebalancer.rebalance();
if (status != TRI_ERROR_ARANGO_BUSY) {
std::this_thread::sleep_for(std::chrono::milliseconds(500));
} else {
std::this_thread::sleep_for(std::chrono::microseconds(100));