1
0
Fork 0

Add removeAlwaysOnClusterRules helper.

This commit is contained in:
Max Neunhoeffer 2014-10-28 10:59:27 +01:00
parent f3fdb8ff4e
commit cfb9b8a37a
1 changed files with 14 additions and 0 deletions

View File

@ -546,6 +546,18 @@ function getQueryMultiplePlansAndExecutions (query, bindVars, testObject, debug)
return {'plans': plans, 'results': results};
}
function removeAlwaysOnClusterRules (rules) {
var pos;
var copy = [];
for (pos = 0; pos < rules.length; pos++) {
if (rules[pos] !== "scatter-in-cluster" &&
rules[pos] !== "distribute-in-cluster") {
copy.push(rules[pos]);
}
}
return copy;
}
// -----------------------------------------------------------------------------
// --SECTION-- module exports
// -----------------------------------------------------------------------------
@ -567,6 +579,8 @@ exports.getCompactPlan = getCompactPlan;
exports.findExecutionNodes = findExecutionNodes;
exports.findReferencedNodes = findReferencedNodes;
exports.getQueryMultiplePlansAndExecutions = getQueryMultiplePlansAndExecutions;
exports.removeAlwaysOnClusterRules = removeAlwaysOnClusterRules;
// -----------------------------------------------------------------------------
// --SECTION-- END-OF-FILE
// -----------------------------------------------------------------------------