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

Cherry-pick check titandb directory when titan is disabled #5720

Merged
merged 29 commits into from
Nov 18, 2019

Conversation

tabokie
Copy link
Member

@tabokie tabokie commented Oct 23, 2019

Signed-off-by: tabokie xy.tao@outlook.com

What have you changed?

Check titandb directory is empty (ls *.blob count = 0) when titan is disabled. Fatal panic if this check fails, which indicates titan is turned off before all blob files are merged.

What is the type of the changes?

  • Misc (other changes)

How is the PR tested?

  • Unit test

Does this PR affect documentation (docs) or should it be mentioned in the release notes?

Does this PR affect tidb-ansible?

Refer to a related PR or issue link (optional)

Benchmark result if necessary (optional)

Any examples? (optional)

Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
@tabokie tabokie added component/titan Component: Titan engine type/cherry-pick Type: PR - Cherry pick labels Oct 23, 2019
@Connor1996
Copy link
Member

Please do not merge it until we release v3.0.5

Signed-off-by: tabokie <xy.tao@outlook.com>
@tabokie
Copy link
Member Author

tabokie commented Oct 24, 2019

/run-all-tests

let cache = self.cfg.storage.block_cache.build_shared_cache();
let kv_db_opt = self.cfg.rocksdb.build_opt();
let kv_cfs_opt = self.cfg.rocksdb.build_cf_opts(&cache);
let engine = Arc::new(
rocks::util::new_engine_opt(kv_path.to_str().unwrap(), kv_db_opt, kv_cfs_opt)
.unwrap(),
);
let raft_path = dir.path().join(Path::new("raft"));
let raft_path = dir.path().join("raft");
Copy link
Member

Choose a reason for hiding this comment

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

what's the differance?

Copy link
Member Author

@tabokie tabokie Oct 29, 2019

Choose a reason for hiding this comment

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

No difference, can remove the Path dependency now. And also more consistent.

Copy link
Member

@Connor1996 Connor1996 left a comment

Choose a reason for hiding this comment

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

LGTM

@Connor1996 Connor1996 added the status/can-merge Indicates a PR has been approved by a committer. label Oct 30, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Oct 30, 2019

Sorry @Connor1996, you don't have permission to trigger auto merge event on this branch.

@tabokie
Copy link
Member Author

tabokie commented Oct 31, 2019

/run-all-tests

@AndreMouche
Copy link
Member

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Nov 18, 2019

Your auto merge job has been accepted, waiting for 5895, 5918, 5913, 5863, 5929, 5923

@sre-bot
Copy link
Contributor

sre-bot commented Nov 18, 2019

/run-all-tests

@sre-bot sre-bot merged commit 8a64c6b into tikv:release-3.0 Nov 18, 2019
@AndreMouche AndreMouche added this to the v3.0.6 milestone Nov 19, 2019
@tabokie tabokie deleted the titan-check-3.0 branch December 23, 2020 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/titan Component: Titan engine status/can-merge Indicates a PR has been approved by a committer. type/cherry-pick Type: PR - Cherry pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants