Skip to content
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

Merged
merged 7 commits into from
Jan 30, 2018
Merged

Conversation

zhangjinpeng87
Copy link
Member

Keys in raw KV scenario don't have ts tail, in that situation we can't use region's end_key to involve delete_files_in_range.

@zhangjinpeng87
Copy link
Member Author

@siddontang @BusyJay PTAL

@@ -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();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return error

@siddontang
Copy link
Contributor

Rest LGTM

PTAL @huachaohuang

@@ -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 {
Copy link
Contributor

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()?

huachaohuang
huachaohuang previously approved these changes Jan 30, 2018
Copy link
Contributor

@huachaohuang huachaohuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhangjinpeng87 zhangjinpeng87 merged commit 9a7c6a5 into tikv:master Jan 30, 2018
@zhangjinpeng87 zhangjinpeng87 deleted the fix-cleanup branch January 30, 2018 11:44
sticnarf pushed a commit to sticnarf/tikv that referenced this pull request Oct 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants