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

raftstore/apply: Temporarily skip delete all in range #3046

Merged

Conversation

MyonKeminta
Copy link
Contributor

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

@MyonKeminta MyonKeminta changed the title [DNM] Temporarily skip delete all in range [DNM] raftstore/apply: Temporarily skip delete all in range May 9, 2018
@MyonKeminta
Copy link
Contributor Author

@zhangjinpeng1987 PTAL

@zhangjinpeng87
Copy link
Member

If use_delete_range is true, don't skip the cleanup process.

@siddontang
Copy link
Contributor

LGTM

@MyonKeminta MyonKeminta changed the title [DNM] raftstore/apply: Temporarily skip delete all in range raftstore/apply: Temporarily skip delete all in range May 14, 2018
@MyonKeminta
Copy link
Contributor Author

@BusyJay

// 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;
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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.

Duration::from_secs(5),
);
fn get_impl(&mut self, cf: &str, key: &[u8], read_quorum: bool) -> Option<Vec<u8>> {
let req = match cf {
Copy link
Member

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.

@zhangjinpeng87
Copy link
Member

LGTM

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.

Rest LGTM

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

Choose a reason for hiding this comment

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

What's this?

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

Choose a reason for hiding this comment

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

s/last/leave

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

@huachaohuang
Copy link
Contributor

/run-integration-tests

@MyonKeminta
Copy link
Contributor Author

/run-integration-ddl-test tidb-test=pr/526

1 similar comment
@MyonKeminta
Copy link
Contributor Author

/run-integration-ddl-test tidb-test=pr/526

@MyonKeminta
Copy link
Contributor Author

/run-integration-ddl-test

@MyonKeminta
Copy link
Contributor Author

/run-integration-ddl-test tidb-test=pr/526

1 similar comment
@MyonKeminta
Copy link
Contributor Author

/run-integration-ddl-test tidb-test=pr/526

@siddontang
Copy link
Contributor

/run-all-tests

@zhangjinpeng87 zhangjinpeng87 merged commit 5859f8e into tikv:master May 15, 2018
@siddontang siddontang mentioned this pull request May 15, 2018
MyonKeminta added a commit to MyonKeminta/tikv that referenced this pull request May 15, 2018
overvenus pushed a commit to overvenus/tikv that referenced this pull request May 15, 2018
@MyonKeminta MyonKeminta deleted the misono/delete-range-skip-cleanup branch December 5, 2018 07:49
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.

5 participants