mirror of https://gitee.com/bigwinds/arangodb
Repair resilience-sharddist test by increasing timeout. (#4857)
This commit is contained in:
parent
148bdb7158
commit
793101528f
|
@ -2639,13 +2639,25 @@ std::shared_ptr<LogicalCollection> ClusterMethods::persistCollectionInAgency(
|
|||
|
||||
// the default behaviour however is to bail out and inform the user
|
||||
// that the requested replicationFactor is not possible right now
|
||||
if (enforceReplicationFactor && dbServers.size() < replicationFactor) {
|
||||
THROW_ARANGO_EXCEPTION(TRI_ERROR_CLUSTER_INSUFFICIENT_DBSERVERS);
|
||||
if (dbServers.size() < replicationFactor) {
|
||||
LOG_TOPIC(DEBUG, Logger::CLUSTER)
|
||||
<< "Do not have enough DBServers for requested replicationFactor,"
|
||||
<< " nrDBServers: " << dbServers.size()
|
||||
<< " replicationFactor: " << replicationFactor;
|
||||
if (enforceReplicationFactor) {
|
||||
THROW_ARANGO_EXCEPTION(TRI_ERROR_CLUSTER_INSUFFICIENT_DBSERVERS);
|
||||
}
|
||||
}
|
||||
|
||||
if (!avoid.empty()) {
|
||||
// We need to remove all servers that are in the avoid list
|
||||
if (dbServers.size() - avoid.size() < replicationFactor) {
|
||||
LOG_TOPIC(DEBUG, Logger::CLUSTER)
|
||||
<< "Do not have enough DBServers for requested replicationFactor,"
|
||||
<< " (after considering avoid list),"
|
||||
<< " nrDBServers: " << dbServers.size()
|
||||
<< " replicationFactor: " << replicationFactor
|
||||
<< " avoid list size: " << avoid.size();
|
||||
// Not enough DBServers left
|
||||
THROW_ARANGO_EXCEPTION(TRI_ERROR_CLUSTER_INSUFFICIENT_DBSERVERS);
|
||||
}
|
||||
|
|
|
@ -283,7 +283,7 @@ describe('Shard distribution', function () {
|
|||
var shards = Object.keys(cinfo.shards);
|
||||
var replFactor = cinfo.shards[shards[0]].length;
|
||||
var count = 0;
|
||||
while (++count <= 180) {
|
||||
while (++count <= 600) {
|
||||
var ccinfo = shards.map(
|
||||
s => global.ArangoClusterInfo.getCollectionInfoCurrent(
|
||||
"_system", collection, s)
|
||||
|
@ -292,10 +292,15 @@ describe('Shard distribution', function () {
|
|||
if (_.every(replicas, x => x.length === replFactor)) {
|
||||
return true;
|
||||
}
|
||||
if (count % 60 === 0) {
|
||||
console.info("waitForSynchronousReplication: cinfo:",
|
||||
JSON.stringify(cinfo), ", replicas: ",
|
||||
JSON.stringify(replicas));
|
||||
}
|
||||
wait(0.5);
|
||||
global.ArangoClusterInfo.flush();
|
||||
}
|
||||
console.error(`Collection "${collection}" failed to get all followers in sync after 60 sec`);
|
||||
console.error(`Collection "${collection}" failed to get all followers in sync after 600 sec`);
|
||||
return false;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue