8000 Fix an intermediate commit error (#6909) · Mars2018/arangodb@947baf9 · GitHub
[go: up one dir, main page]

8000
Skip to content

Commit 947baf9

Browse files
graetzerjsteemann
authored andcommitted
Fix an intermediate commit error (arangodb#6909)
1 parent c98870e commit 947baf9

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

arangod/RocksDBEngine/RocksDBIncrementalSync.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numbe 8000 rDiff line change
@@ -448,8 +448,10 @@ Result handleSyncKeysRocksDB(DatabaseInitialSyncer& syncer,
448448
transaction::StandaloneContext::Create(syncer.vocbase()), col->cid(),
449449
AccessMode::Type::EXCLUSIVE);
450450

451-
trx.addHint(
452-
transaction::Hints::Hint::RECOVERY); // to turn off waitForSync!
451+
trx.addHint(transaction::Hints::Hint::RECOVERY); // turn off waitForSync!
452+
trx.addHint(transaction::Hints::Hint::NO_INDEXING);
453+
// turn on intermediate commits as the number of keys to delete can be huge here
454+
trx.addHint(transaction::Hints::Hint::INTERMEDIATE_COMMITS);
453455

454456
Result res = trx.begin();
455457

@@ -505,6 +507,8 @@ Result handleSyncKeysRocksDB(DatabaseInitialSyncer& syncer,
505507

506508
trx.addHint(transaction::Hints::Hint::RECOVERY); // turn off waitForSync!
507509
trx.addHint(transaction::Hints::Hint::NO_INDEXING);
510+
// turn on intermediate commits as the number of operations can be huge here
511+
trx.addHint(transaction::Hints::Hint::INTERMEDIATE_COMMITS);
508512

509513
Result res = trx.begin();
510514

arangod/RocksDBEngine/RocksDBRestReplicationHandler.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,8 @@ void RocksDBRestReplicationHandler::handleCommandBarrier() {
186186
if (type == rest::RequestType::POST) {
187187
VPackBuilder b;
188188
b.add(VPackValue(VPackValueType::Object));
189-
// always return a non-0 barrier id
190-
// it will be ignored by the client anyway for the RocksDB engine
191-
std::string const idString = std::to_string(TRI_NewTickServer());
192-
b.add("id", VPackValue(idString));
189+
// always return a 0 barrier ID so clients will ignore it
190+
b.add("id", VPackValue("0"));
193191
b.close();
194192
generateResult(rest::ResponseCode::OK, b.slice());
195193
} else if (type == rest::RequestType::PUT ||

0 commit comments

Comments
 (0)
0