1
0
Fork 0

Merge branch 'devel' of https://github.com/arangodb/arangodb into feature/edge-index-hacks

This commit is contained in:
Simon Grätzer 2017-06-02 12:15:32 +02:00
commit 3909e6b3af
3 changed files with 4 additions and 3 deletions

View File

@ -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*.

View File

@ -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(

View File

@ -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);
}