mirror of https://gitee.com/bigwinds/arangodb
backported some fixes from devel (#6698)
This commit is contained in:
parent
6b4e7178e2
commit
f1eae110c5
|
@ -150,7 +150,7 @@ void EngineInfoContainerDBServer::EngineInfo::addNode(ExecutionNode* node) {
|
|||
}
|
||||
|
||||
// do not set '_type' of the engine here,
|
||||
// bacause satellite collections may consists of
|
||||
// because satellite collections may consist of
|
||||
// multiple "main nodes"
|
||||
|
||||
break;
|
||||
|
|
|
@ -220,6 +220,8 @@ void IndexBlock::executeExpressions() {
|
|||
void IndexBlock::initializeOnce() {
|
||||
auto en = ExecutionNode::castTo<IndexNode const*>(getPlanNode());
|
||||
auto ast = en->_plan->getAst();
|
||||
|
||||
_trx->pinData(_collection->id());
|
||||
|
||||
// instantiate expressions:
|
||||
auto instantiateExpression = [&](AstNode* a,
|
||||
|
|
|
@ -4626,7 +4626,7 @@ void arangodb::aql::restrictToSingleShardRule(
|
|||
currentType == ExecutionNode::DISTRIBUTE ||
|
||||
currentType == ExecutionNode::SINGLETON) {
|
||||
// we reached a new snippet or the end of the plan - we can abort
|
||||
// searching now additionally, we cannot yet handle UPSERT well
|
||||
// searching now. additionally, we cannot yet handle UPSERT well
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -260,10 +260,6 @@ void OptimizerRulesFeature::addRules() {
|
|||
);
|
||||
#endif
|
||||
|
||||
// @brief replace WITHIN_RECTANGLE(...), NEAR(...), WITHIN(...)
|
||||
/*OptimizerRulesFeature::registerRule("replace-legacy-geo-functions", replaceLegacyGeoFunctionsRule,
|
||||
OptimizerRule::removeLegacyGeoFunctions_pass1, DoesNotCreateAdditionalPlans, CanBeDisabled);*/
|
||||
|
||||
// remove FILTER DISTANCE(...) and SORT DISTANCE(...)
|
||||
OptimizerRulesFeature::registerRule("geo-index-optimizer", geoIndexRule,
|
||||
OptimizerRule::applyGeoIndexRule, DoesNotCreateAdditionalPlans, CanBeDisabled);
|
||||
|
|
|
@ -215,6 +215,9 @@ bool IResearchViewBlockBase::readDocument(
|
|||
|
||||
TRI_ASSERT(_trx->state());
|
||||
|
||||
// this is necessary for MMFiles
|
||||
_trx->pinData(docPk.cid());
|
||||
|
||||
// `Methods::documentCollection(TRI_voc_cid_t)` may throw exception
|
||||
auto* collection = _trx->state()->collection(docPk.cid(), arangodb::AccessMode::Type::READ);
|
||||
|
||||
|
|
|
@ -2956,6 +2956,7 @@ MMFilesDocumentPosition MMFilesCollection::lookupDocument(LocalDocumentId const&
|
|||
if (old) {
|
||||
return old;
|
||||
}
|
||||
TRI_ASSERT(false);
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL,
|
||||
"got invalid revision value on lookup");
|
||||
}
|
||||
|
@ -2969,6 +2970,7 @@ uint8_t const* MMFilesCollection::lookupDocumentVPack(LocalDocumentId const& doc
|
|||
TRI_ASSERT(VPackSlice(vpack).isObject());
|
||||
return vpack;
|
||||
}
|
||||
TRI_ASSERT(false);
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL,
|
||||
"got invalid vpack value on lookup");
|
||||
}
|
||||
|
|
|
@ -62,6 +62,12 @@ ShardingInfo::ShardingInfo(arangodb::velocypack::Slice info, LogicalCollection*
|
|||
"invalid number of shards");
|
||||
}
|
||||
}
|
||||
|
||||
VPackSlice v = info.get("numberOfShards");
|
||||
if (!v.isNone() && !v.isNumber() && !v.isNull()) {
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_BAD_PARAMETER,
|
||||
"invalid number of shards");
|
||||
}
|
||||
|
||||
if (info.hasKey("avoidServers")) {
|
||||
auto avoidServersSlice = info.get("avoidServers");
|
||||
|
|
Loading…
Reference in New Issue