mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into feature/edge-index-hacks
This commit is contained in:
commit
3909e6b3af
|
@ -384,7 +384,7 @@ Replace the pattern *search* with the string *replacement* in the string
|
|||
in *text*
|
||||
|
||||
For more details about the rules for characters and sequences refer
|
||||
[REGEX_TEST()](#regex_test).
|
||||
[REGEX_TEST()](#regextest).
|
||||
|
||||
If the regular expression in *search* is invalid, a warning will be raised
|
||||
and the function will return *false*.
|
||||
|
|
|
@ -2330,7 +2330,7 @@ ClusterMethods::persistCollectionInAgency(
|
|||
size_t replicationFactor = col->replicationFactor();
|
||||
|
||||
ClusterInfo* ci = ClusterInfo::instance();
|
||||
std::vector<std::string> dbServers = ci->getCurrentDBServers();
|
||||
std::vector<std::string> dbServers;
|
||||
if (!distributeShardsLike.empty()) {
|
||||
CollectionNameResolver resolver(col->vocbase());
|
||||
TRI_voc_cid_t otherCid =
|
||||
|
@ -2365,6 +2365,7 @@ ClusterMethods::persistCollectionInAgency(
|
|||
}
|
||||
col->distributeShardsLike(otherCidString);
|
||||
} else {
|
||||
dbServers = ci->getCurrentDBServers();
|
||||
if (ignoreDistributeShardsLikeErrors) {
|
||||
col->distributeShardsLike(std::string());
|
||||
} else {
|
||||
|
@ -2372,6 +2373,7 @@ ClusterMethods::persistCollectionInAgency(
|
|||
}
|
||||
}
|
||||
} else if (!avoid.empty()) {
|
||||
dbServers = ci->getCurrentDBServers();
|
||||
if (dbServers.size() - avoid.size() >= replicationFactor) {
|
||||
dbServers.erase(
|
||||
std::remove_if(
|
||||
|
|
|
@ -55,7 +55,6 @@ function DistributeShardsLikeSuite() {
|
|||
fail();
|
||||
}
|
||||
catch (err) {
|
||||
require("internal").print("FUXX:", JSON.stringify(err));
|
||||
assertEqual(errors.ERROR_CLUSTER_UNKNOWN_DISTRIBUTESHARDSLIKE.code,
|
||||
err.errorNum);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue