mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into devel
This commit is contained in:
commit
e245e155a1
|
@ -30,11 +30,6 @@ not present, it will be created.
|
||||||
<!-- arangod/Wal/LogfileManager.h -->
|
<!-- arangod/Wal/LogfileManager.h -->
|
||||||
@startDocuBlock WalLogfileAllowOversizeEntries
|
@startDocuBlock WalLogfileAllowOversizeEntries
|
||||||
|
|
||||||
!SUBSECTION Suppress shape information
|
|
||||||
|
|
||||||
<!-- arangod/Wal/LogfileManager.h -->
|
|
||||||
@startDocuBlock WalLogfileSuppressShapeInformation
|
|
||||||
|
|
||||||
!SUBSECTION Number of reserve logfiles
|
!SUBSECTION Number of reserve logfiles
|
||||||
|
|
||||||
<!-- arangod/Wal/LogfileManager.h -->
|
<!-- arangod/Wal/LogfileManager.h -->
|
||||||
|
|
|
@ -58,10 +58,6 @@ logfiles:
|
||||||
@startDocuBlock WalLogfileAllowOversizeEntries
|
@startDocuBlock WalLogfileAllowOversizeEntries
|
||||||
|
|
||||||
|
|
||||||
<!-- arangod/Wal/LogfileManager.h -->
|
|
||||||
@startDocuBlock WalLogfileSuppressShapeInformation
|
|
||||||
|
|
||||||
|
|
||||||
When data gets copied from the write-ahead logfiles into the journals or datafiles
|
When data gets copied from the write-ahead logfiles into the journals or datafiles
|
||||||
of collections, files will be created on the collection level. How big these files
|
of collections, files will be created on the collection level. How big these files
|
||||||
are is determined by the following global configuration value:
|
are is determined by the following global configuration value:
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
|
|
||||||
@startDocuBlock WalLogfileSuppressShapeInformation
|
|
||||||
@brief suppress shape information
|
|
||||||
`--wal.suppress-shape-information`
|
|
||||||
|
|
||||||
Setting this variable to *true* will lead to no shape information being
|
|
||||||
written into the write-ahead logfiles for documents or edges. While this
|
|
||||||
is
|
|
||||||
a good optimization for a single server to save memory (and disk space),
|
|
||||||
it
|
|
||||||
it will effectively disable using the write-ahead log as a reliable source
|
|
||||||
for replicating changes to other servers. A master server with this option
|
|
||||||
set to *true* will not be able to fully reproduce the structure of saved
|
|
||||||
documents after a collection has been deleted. In case a replication
|
|
||||||
client
|
|
||||||
requests a document for which the collection is already deleted, the
|
|
||||||
master
|
|
||||||
will return an empty document. Note that this only affects replication and
|
|
||||||
not normal operation on the master.
|
|
||||||
|
|
||||||
**Do not set this variable to *true* on a server that you plan to use as a
|
|
||||||
replication master**
|
|
||||||
@endDocuBlock
|
|
||||||
|
|
|
@ -3762,6 +3762,8 @@ void arangodb::aql::inlineSubqueriesRule(Optimizer* opt,
|
||||||
Variable const* out = subqueryNode->outVariable();
|
Variable const* out = subqueryNode->outVariable();
|
||||||
TRI_ASSERT(out != nullptr);
|
TRI_ASSERT(out != nullptr);
|
||||||
|
|
||||||
|
std::unordered_set<Variable const*> varsUsed;
|
||||||
|
|
||||||
current = n;
|
current = n;
|
||||||
// now check where the subquery is used
|
// now check where the subquery is used
|
||||||
while (current->hasParent()) {
|
while (current->hasParent()) {
|
||||||
|
@ -3836,6 +3838,7 @@ void arangodb::aql::inlineSubqueriesRule(Optimizer* opt,
|
||||||
RedundantCalculationsReplacer finder(replacements);
|
RedundantCalculationsReplacer finder(replacements);
|
||||||
plan->root()->walk(&finder);
|
plan->root()->walk(&finder);
|
||||||
|
|
||||||
|
// abort optimization
|
||||||
current = nullptr;
|
current = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3844,6 +3847,14 @@ void arangodb::aql::inlineSubqueriesRule(Optimizer* opt,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
varsUsed.clear();
|
||||||
|
current->getVariablesUsedHere(varsUsed);
|
||||||
|
if (varsUsed.find(out) != varsUsed.end()) {
|
||||||
|
// we found another node that uses the subquery variable
|
||||||
|
// we need to stop the optimization attempts here
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
current = current->getFirstParent();
|
current = current->getFirstParent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,6 +226,18 @@ function optimizerRuleCollectionTestSuite () {
|
||||||
var query = "LET x = (FOR doc IN @@cn RETURN doc) FOR doc2 IN x RETURN x";
|
var query = "LET x = (FOR doc IN @@cn RETURN doc) FOR doc2 IN x RETURN x";
|
||||||
var result = AQL_EXPLAIN(query, { "@cn" : cn });
|
var result = AQL_EXPLAIN(query, { "@cn" : cn });
|
||||||
assertEqual(-1, result.plan.rules.indexOf(ruleName), query); // no optimization
|
assertEqual(-1, result.plan.rules.indexOf(ruleName), query); // no optimization
|
||||||
|
},
|
||||||
|
|
||||||
|
testSpecificPlan4 : function () {
|
||||||
|
var query = "LET x = (FOR doc IN @@cn RETURN doc) FOR i IN 1..10 FILTER LENGTH(x) FOR y IN x RETURN y";
|
||||||
|
var result = AQL_EXPLAIN(query, { "@cn" : cn });
|
||||||
|
assertEqual(-1, result.plan.rules.indexOf(ruleName), query); // no optimization
|
||||||
|
},
|
||||||
|
|
||||||
|
testSpecificPlan5 : function () {
|
||||||
|
var query = "FOR j IN 1..10 LET x = (FOR doc IN @@cn RETURN doc) FOR i IN 1..10 FILTER LENGTH(x) FOR y IN x RETURN y";
|
||||||
|
var result = AQL_EXPLAIN(query, { "@cn" : cn });
|
||||||
|
assertEqual(-1, result.plan.rules.indexOf(ruleName), query); // no optimization
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue