Remove TxnMergeTree from the Raft layer#3563
Conversation
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
|
/run-all-tests |
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
|
Coverage detail: https://ci-internal.pingcap.net/job/tics_ghpr_unit_test/212/cobertura/ lines: 37.5% (44401 out of 118427) |
|
/run-all-tests |
|
Coverage detail: https://ci-internal.pingcap.net/job/tics_ghpr_unit_test/213/cobertura/ lines: 37.6% (44488 out of 118427) |
SchrodingerZhu
left a comment
There was a problem hiding this comment.
large change. but LGTM.
|
/cc @solotzg @fuzhe1989 |
JaySon-Huang
left a comment
There was a problem hiding this comment.
The main changes are listed below:
| { | ||
| switch (storage->engineType()) | ||
| { | ||
| case TiDB::StorageEngine::TMT: |
| if (auto & tmt = context->getTMTContext(); !tmt.isBgFlushDisabled()) | ||
| { | ||
| /// All regions of this table is removed, the storage maybe drop or pd | ||
| /// move it to another node, we can optimize outdated data. | ||
| table_to_optimize.insert(table_id); | ||
| } |
| if (table_info.engine_type == TiDB::StorageEngine::TMT) | ||
| { | ||
| writeString(") Engine = TxnMergeTree((", stmt_buf); | ||
| for (size_t i = 0; i < pks.size(); i++) | ||
| { | ||
| if (i > 0) | ||
| writeString(", ", stmt_buf); | ||
| writeBackQuotedString(pks[i], stmt_buf); | ||
| } | ||
| writeString("), 8192, '", stmt_buf); | ||
| writeEscapedString(table_info.serialize(), stmt_buf); | ||
| writeString("')", stmt_buf); | ||
| } | ||
| else if (table_info.engine_type == TiDB::StorageEngine::DT) |
| // if all regions of table is removed, try to optimize data. | ||
| if (auto table_id = region_table.popOneTableToOptimize(); table_id != InvalidTableID) | ||
| { | ||
| LOG_INFO(log, "try to final optimize table " << table_id); | ||
| tryOptimizeStorageFinal(tmt.getContext(), table_id); | ||
| LOG_INFO(log, "finish final optimize table " << table_id); | ||
| } |
|
/merge |
|
@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: 2d12323 |
|
Coverage detail: https://ci-internal.pingcap.net/job/tics_ghpr_unit_test/215/cobertura/ lines: 37.5% (44399 out of 118427) |
What problem does this PR solve?
Issue Number: a part of #3481
Problem Summary:
What is changed and how it works?
BackgroundProcessingPoolintoStorageslevelCheck List
Tests
Side effects
Documentation
Release note