mirror of https://gitee.com/bigwinds/arangodb
fix geo-index for cluster case
This commit is contained in:
parent
634eeabc0b
commit
1d5e28d969
|
@ -4417,8 +4417,8 @@ bool applyGeoOptimization(bool near, ExecutionPlan* plan, GeoIndexInfo& info){
|
||||||
|
|
||||||
// if executionNode is sort OR a filter without further sub conditions
|
// if executionNode is sort OR a filter without further sub conditions
|
||||||
// the node can be unlinked
|
// the node can be unlinked
|
||||||
if( info.executionNodeType == EN::SORT || !info.expressionParent){
|
if(!info.expressionParent){
|
||||||
if (!arangodb::ServerState::instance()->isCoordinator()) {
|
if (!arangodb::ServerState::instance()->isCoordinator() || info.executionNodeType == EN::FILTER) {
|
||||||
plan->unlinkNode(info.executionNode);
|
plan->unlinkNode(info.executionNode);
|
||||||
} else if (info.executionNodeType == EN::SORT){
|
} else if (info.executionNodeType == EN::SORT){
|
||||||
//make sure sort is not reinserted in cluster
|
//make sure sort is not reinserted in cluster
|
||||||
|
|
|
@ -53,7 +53,7 @@ class SortNode : public ExecutionNode {
|
||||||
public:
|
public:
|
||||||
SortNode(ExecutionPlan* plan, size_t id, SortElementVector const& elements,
|
SortNode(ExecutionPlan* plan, size_t id, SortElementVector const& elements,
|
||||||
bool stable)
|
bool stable)
|
||||||
: ExecutionNode(plan, id), _elements(elements), _stable(stable) {}
|
: ExecutionNode(plan, id), _reinsertInCluster(true), _elements(elements), _stable(stable) {}
|
||||||
|
|
||||||
SortNode(ExecutionPlan* plan, arangodb::velocypack::Slice const& base,
|
SortNode(ExecutionPlan* plan, arangodb::velocypack::Slice const& base,
|
||||||
SortElementVector const& elements, bool stable);
|
SortElementVector const& elements, bool stable);
|
||||||
|
|
Loading…
Reference in New Issue