-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
raftstore/apply: Temporarily skip delete all in range #3046
raftstore/apply: Temporarily skip delete all in range #3046
Conversation
@zhangjinpeng1987 PTAL |
If use_delete_range is true, don't skip the cleanup process. |
LGTM |
tests/raftstore/cluster.rs
Outdated
// Set this flag to pass tests. (Issue #3034) | ||
// TODO: Remove it after apply pool is implemented. | ||
// TODO: In the future, maybe it's better to test both true and false | ||
cfg.raft_store.use_delete_range = true; |
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.
If this is false, what cases will fail?
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.
raftstore_cases::test_single::test_node_delete_range
raftstore_cases::test_single::test_server_delete_range
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.
Can you adapt those cases instead? We should test the default settings. By the way, only the server case is necessary, the node case is duplicated.
tests/raftstore/cluster.rs
Outdated
Duration::from_secs(5), | ||
); | ||
fn get_impl(&mut self, cf: &str, key: &[u8], read_quorum: bool) -> Option<Vec<u8>> { | ||
let req = match cf { |
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.
We can reuse new_get_cf_cmd when cf is default.
LGTM |
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.
Rest LGTM
tests/raftstore/cluster.rs
Outdated
@@ -109,6 +109,7 @@ impl<T: Simulator> Cluster<T> { | |||
sim: Arc<RwLock<T>>, | |||
pd_client: Arc<TestPdClient>, | |||
) -> Cluster<T> { | |||
// TODO: In the future, maybe it's better to test both true and false |
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.
What's this?
src/server/service/kv.rs
Outdated
@@ -585,6 +585,7 @@ impl<T: RaftStoreRouter + 'static> tikvpb_grpc::Tikv for Service<T> { | |||
ctx.spawn(future); | |||
} | |||
|
|||
// WARNING: Currently this API may last some dirty keys in TiKV. Be careful using this API. |
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.
s/last/leave
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
/run-integration-tests |
/run-integration-ddl-test tidb-test=pr/526 |
1 similar comment
/run-integration-ddl-test tidb-test=pr/526 |
/run-integration-ddl-test |
/run-integration-ddl-test tidb-test=pr/526 |
1 similar comment
/run-integration-ddl-test tidb-test=pr/526 |
/run-all-tests |
Please refer to #3034
This PR skips the second step of delete range (
delete_all_in_range
) temporarily.However in order to make this change, some tests about delete range have to be bypassed, which is somewhat dangerous. Please make sure we do really need this before merging this.
Related pull request in TiDB: pingcap/tidb#6512