Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: tabokie <xy.tao@outlook.com>
  • Loading branch information
tabokie committed Jun 28, 2023
1 parent 81175fd commit 6280fc3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions components/engine_rocks/src/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ impl RocksEngine {
.as_ref()
.map_or(false, |key| key.as_slice() > r.start_key)
{
self.delete_all_in_range_cf_by_key(wopts, cf, &r)?;
written = true;
written |= self.delete_all_in_range_cf_by_key(wopts, cf, &r)?;
continue;
}
last_end_key = Some(r.end_key.to_owned());
Expand Down
2 changes: 0 additions & 2 deletions components/raftstore-v2/src/operation/command/write/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,6 @@ impl<EK: KvEngine, R: ApplyResReporter> Apply<EK, R> {
if index != u64::MAX && written {
self.modifications_mut()[off] = index;
}
// delete range is an unsafe operation and it cannot be rollbacked to replay, so
// we don't update modification index for this operation.

Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion tests/integrations/raftstore/test_single.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ fn test_delete() {
}

#[test_case(test_raftstore::new_node_cluster)]
// v2 doesn't support.
// v2 doesn't support RocksDB delete range.
fn test_node_use_delete_range() {
let mut cluster = new_cluster(0, 1);
cluster.cfg.raft_store.use_delete_range = true;
Expand Down

0 comments on commit 6280fc3

Please sign in to comment.