mirror of https://gitee.com/bigwinds/arangodb
Fix shard removeShardFollower functionality.
This commit is contained in:
parent
c1fc27c585
commit
d48f5506f2
|
@ -849,11 +849,13 @@ function dropLocalCollections (plannedCollections, writeLocked) {
|
||||||
// is also no problem, since the leader will soon notice
|
// is also no problem, since the leader will soon notice
|
||||||
// that the shard here is gone and will drop us automatically:
|
// that the shard here is gone and will drop us automatically:
|
||||||
var servers = shardMap[collection];
|
var servers = shardMap[collection];
|
||||||
|
if (servers !== undefined) {
|
||||||
var endpoint = ArangoClusterInfo.getServerEndpoint(servers[0]);
|
var endpoint = ArangoClusterInfo.getServerEndpoint(servers[0]);
|
||||||
try {
|
try {
|
||||||
removeShardFollower(endpoint, database, collection);
|
removeShardFollower(endpoint, database, collection);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
}
|
}
|
||||||
|
}
|
||||||
console.info("dropping local shard '%s/%s' of '%s/%s",
|
console.info("dropping local shard '%s/%s' of '%s/%s",
|
||||||
database,
|
database,
|
||||||
collection,
|
collection,
|
||||||
|
@ -995,11 +997,11 @@ function synchronizeOneShard(database, shard, planId, leader) {
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
console.info("synchronizeOneShard: syncCollection did not work,",
|
console.info("synchronizeOneShard: syncCollection did not work,",
|
||||||
"trying again later for shard", shard);
|
"trying again later for shard", shard, err);
|
||||||
}
|
}
|
||||||
if (--count <= 0) {
|
if (--count <= 0) {
|
||||||
console.error("synchronizeOneShard: syncCollection did not work",
|
console.error("synchronizeOneShard: syncCollection did not work",
|
||||||
"after many tries, giving up on shard", shard);
|
"after many tries, giving up on shard", shard, err);
|
||||||
throw "syncCollection did not work";
|
throw "syncCollection did not work";
|
||||||
}
|
}
|
||||||
wait(1.0);
|
wait(1.0);
|
||||||
|
|
Loading…
Reference in New Issue