mirror of https://gitee.com/bigwinds/arangodb
bug fix for jobs looking at distrubuteShardsLike and virtual collections (#4665)
This commit is contained in:
parent
37e2ef461a
commit
3c35cd32dd
|
@ -148,6 +148,8 @@ devel
|
|||
Health did not function for multiple servers at the same time, as
|
||||
agency transaction was malformed.
|
||||
|
||||
* fixed a bug where supervision tried to deal with shards of virtual collections
|
||||
|
||||
|
||||
v3.3.4 (XXXX-XX-XX)
|
||||
-------------------
|
||||
|
|
|
@ -294,7 +294,16 @@ std::vector<Job::shard_t> Job::clones(
|
|||
if (otherCollection != collection &&
|
||||
col.has("distributeShardsLike") &&
|
||||
col("distributeShardsLike").slice().copyString() == collection) {
|
||||
ret.emplace_back(otherCollection, sortedShardList(col("shards"))[steps]);
|
||||
auto const theirshards = sortedShardList(col("shards"));
|
||||
if (theirshards.size() > 0) { // do not care about virtual collections
|
||||
if (theirshards.size() == myshards.size()) {
|
||||
ret.emplace_back(otherCollection, sortedShardList(col("shards"))[steps]);
|
||||
} else {
|
||||
LOG_TOPIC(ERR, Logger::SUPERVISION)
|
||||
<< "Shard distribution of clone(" << othercollection
|
||||
<< ") does not match ours (" << collection << ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue