Skip to content

Commit

Permalink
move rocksdb disableWAL into another pr
Browse files Browse the repository at this point in the history
Change-Id: I8878b88acb02369dcb8cc2f57871f88d98bc3203
  • Loading branch information
Linary committed Dec 28, 2020
1 parent 06f6572 commit 3203540
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -684,17 +684,15 @@ private final class StdSession extends RocksDBSessions.Session {
private WriteOptions writeOptions;

public StdSession(HugeConfig conf) {
boolean raftMode = conf.get(CoreOptions.RAFT_MODE);
boolean bulkload = conf.get(RocksDBOptions.BULKLOAD_MODE);
this.batch = new WriteBatch();
this.writeOptions = new WriteOptions();
/*
* When work under raft mode. if store crashed, the state-machine
* can restore by snapshot + raft log, doesn't need wal and sync
*/
if (raftMode) {
this.writeOptions.setDisableWAL(true);
this.writeOptions.setSync(false);
}
this.writeOptions.setDisableWAL(bulkload);
//this.writeOptions.setSync(false);
}

@Override
Expand Down

0 comments on commit 3203540

Please sign in to comment.