-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix cleanup for raw kv #2724
fix cleanup for raw kv #2724
Conversation
@siddontang @BusyJay PTAL |
src/util/rocksdb/mod.rs
Outdated
@@ -317,26 +333,14 @@ pub fn roughly_cleanup_range(db: &DB, start_key: &[u8], end_key: &[u8]) -> Resul | |||
return Ok(()); | |||
} | |||
|
|||
// Todo: use end_key directly after delete_files_in_range support [start, end) semantics. | |||
let end = prev_key(end_key).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return error
Rest LGTM PTAL @huachaohuang |
src/util/rocksdb/mod.rs
Outdated
@@ -317,26 +333,14 @@ pub fn roughly_cleanup_range(db: &DB, start_key: &[u8], end_key: &[u8]) -> Resul | |||
return Ok(()); | |||
} | |||
|
|||
// Todo: use end_key directly after delete_files_in_range support [start, end) semantics. | |||
let end = prev_key(end_key).unwrap(); | |||
if end.as_slice() >= start_key { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
start_key >= end.as_slice()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Keys in raw KV scenario don't have ts tail, in that situation we can't use region's
end_key
to involvedelete_files_in_range
.