File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 510
510
document [ "type" ] . should eq ( 2302 )
511
511
document [ "cid" ] . should eq ( cid )
512
512
document [ "data" ] [ "_key" ] . should eq ( "test" )
513
- document [ "data" ] [ "_rev" ] . should match ( /^[a-zA-Z0-9_\- ]+$/ )
514
- document [ "data" ] [ "_rev" ] . should_not eq ( rev )
515
513
516
514
i = i + 1
517
515
elsif i == 3 and document [ "type" ] == 2001 and document [ "cid" ] == cid
1630
1628
document [ "type" ] . should eq ( 2302 )
1631
1629
document [ "cid" ] . should eq ( cid )
1632
1630
document [ "data" ] [ "_key" ] . should eq ( "test" )
1633
- document [ "data" ] [ "_rev" ] . should match ( /^[a-zA-Z0-9_\- ]+$/ )
1634
- document [ "data" ] [ "_rev" ] . should_not eq ( rev )
1635
1631
1636
1632
i = i + 1
1637
1633
elsif i == 3 and document [ "type" ] == 2001 and document [ "cid" ] == cid
Original file line number Diff line number Diff line change @@ -655,6 +655,13 @@ Result Syncer::createIndex(VPackSlice const& slice) {
655
655
return Result (TRI_ERROR_ARANGO_COLLECTION_NOT_FOUND,
656
656
" did not find collection for index" );
657
657
}
658
+
659
+ VPackBuilder s;
660
+ s.openObject ();
661
+ s.add (" objectId" , VPackSlice::nullSlice ());
662
+ s.close ();
663
+ VPackBuilder merged = VPackCollection::merge (indexSlice, s.slice (),
664
+ /* mergeValues*/ true , /* nullMeansRemove*/ true );
658
665
659
666
try {
660
667
SingleCollectionTransaction trx (transaction::StandaloneContext::Create (vocbase),
@@ -669,7 +676,7 @@ Result Syncer::createIndex(VPackSlice const& slice) {
669
676
auto physical = trx.documentCollection ()->getPhysical ();
670
677
TRI_ASSERT (physical != nullptr );
671
678
std::shared_ptr<arangodb::Index> idx;
672
- res = physical->restoreIndex (&trx, indexSlice , idx);
679
+ res = physical->restoreIndex (&trx, merged. slice () , idx);
673
680
res = trx.finish (res);
674
681
675
682
return res;
Original file line number Diff line number Diff line change @@ -419,7 +419,6 @@ class WALParser : public rocksdb::WriteBatch::Handler {
419
419
TRI_ASSERT (_currentDbId != 0 && _currentCid != 0 );
420
420
TRI_ASSERT (!_removeDocumentKey.empty ());
421
421
422
- uint64_t revId = RocksDBKey::revisionId (RocksDBEntryType::Document, key);
423
422
_builder.openObject ();
424
423
_builder.add (" tick" , VPackValue (std::to_string (_currentSequence)));
425
424
_builder.add (" type" , VPackValue (static_cast <uint64_t >(REPLICATION_MARKER_REMOVE)));
@@ -432,8 +431,8 @@ class WALParser : public rocksdb::WriteBatch::Handler {
432
431
}
433
432
_builder.add (" tid" , VPackValue (std::to_string (_currentTrxId)));
434
433
_builder.add (" data" , VPackValue (VPackValueType::Object));
434
+ // only pass on _key, but no _rev
435
435
_builder.add (StaticStrings::KeyString, VPackValue (_removeDocumentKey));
436
- _builder.add (StaticStrings::RevString, VPackValue (std::to_string (revId)));
437
436
_builder.close ();
438
437
_builder.close ();
439
438
_removeDocumentKey.clear ();
You can’t perform that action at this time.
0 commit comments