mirror of https://gitee.com/bigwinds/arangodb
fix invalid assertion (#10428)
This commit is contained in:
parent
1f41dbd256
commit
a17ec21767
|
@ -1826,8 +1826,8 @@ OperationResult transaction::Methods::insertLocal(std::string const& collectionN
|
|||
|
||||
if (res.fail()) {
|
||||
// Error reporting in the babies case is done outside of here,
|
||||
if (res.is(TRI_ERROR_ARANGO_CONFLICT) && !isBabies) {
|
||||
TRI_ASSERT(prevDocResult.revisionId() != 0);
|
||||
if (res.is(TRI_ERROR_ARANGO_CONFLICT) && !isBabies && prevDocResult.revisionId() != 0) {
|
||||
TRI_ASSERT(didReplace);
|
||||
|
||||
arangodb::velocypack::StringRef key = value.get(StaticStrings::KeyString).stringRef();
|
||||
buildDocumentIdentity(collection, resultBuilder, cid, key, prevDocResult.revisionId(),
|
||||
|
@ -1837,7 +1837,7 @@ OperationResult transaction::Methods::insertLocal(std::string const& collectionN
|
|||
}
|
||||
|
||||
if (!options.silent) {
|
||||
const bool showReplaced = (options.returnOld && didReplace);
|
||||
bool const showReplaced = (options.returnOld && didReplace);
|
||||
TRI_ASSERT(!options.returnNew || !docResult.empty());
|
||||
TRI_ASSERT(!showReplaced || !prevDocResult.empty());
|
||||
|
||||
|
|
Loading…
Reference in New Issue