-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Enhancement] auto change replication_num of system tables #51799
[Enhancement] auto change replication_num of system tables #51799
Conversation
Signed-off-by: Murphy <[email protected]>
Signed-off-by: Murphy <[email protected]>
Signed-off-by: Murphy <[email protected]>
fe/fe-core/src/main/java/com/starrocks/statistic/StatisticsMetaManager.java
Show resolved
Hide resolved
fe/fe-core/src/main/java/com/starrocks/scheduler/history/TableKeeper.java
Show resolved
Hide resolved
fe/fe-core/src/main/java/com/starrocks/load/loadv2/LoadsHistorySyncer.java
Show resolved
Hide resolved
Signed-off-by: Murphy <[email protected]>
* 1. When scale-out to greater than 3 nodes, change the replication_num to 3 | ||
* 3. When scale-in to less than 3 node, change it to retainedBackendNum | ||
*/ | ||
public static boolean alterSystemTableReplicationNumIfNecessary(String tableName) { |
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.
Behavior change:
before: the replication_num will only be increased but not decreased
now: the replication_num will be increased when scale-out, and decreased when scale-in
plz add test case for this behavior change
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.
done
Signed-off-by: Murphy <[email protected]>
a31931c
Quality Gate passedIssues Measures |
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 45 / 50 (90.00%) file detail
|
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
@Mergifyio backport branch-3.3 |
@Mergifyio backport branch-3.2 |
✅ Backports have been created
|
✅ Backports have been created
|
Signed-off-by: Murphy <[email protected]> (cherry picked from commit 0c0ea45) # Conflicts: # fe/fe-core/src/main/java/com/starrocks/load/loadv2/LoadsHistorySyncer.java # fe/fe-core/src/main/java/com/starrocks/load/pipe/filelist/RepoCreator.java # fe/fe-core/src/main/java/com/starrocks/statistic/StatisticsMetaManager.java
Signed-off-by: Murphy <[email protected]> (cherry picked from commit 0c0ea45) # Conflicts: # fe/fe-core/src/main/java/com/starrocks/load/loadv2/LoadsHistorySyncer.java # fe/fe-core/src/main/java/com/starrocks/load/pipe/filelist/RepoCreator.java # fe/fe-core/src/main/java/com/starrocks/scheduler/history/TableKeeper.java # fe/fe-core/src/main/java/com/starrocks/scheduler/history/TaskRunHistoryTable.java # fe/fe-core/src/main/java/com/starrocks/statistic/StatisticUtils.java # fe/fe-core/src/main/java/com/starrocks/statistic/StatisticsMetaManager.java # fe/fe-core/src/test/java/com/starrocks/scheduler/history/TaskRunHistoryTest.java
Signed-off-by: Murphy <[email protected]> (cherry picked from commit 0c0ea45) Signed-off-by: Murphy <[email protected]> # Conflicts: # fe/fe-core/src/main/java/com/starrocks/load/loadv2/LoadsHistorySyncer.java # fe/fe-core/src/main/java/com/starrocks/load/pipe/filelist/RepoCreator.java # fe/fe-core/src/main/java/com/starrocks/statistic/StatisticsMetaManager.java
…#51799) Signed-off-by: Murphy <[email protected]>
…#51799) Signed-off-by: Murphy <[email protected]> Signed-off-by: zhiminr.ren <[email protected]>
…51799) (#51886) Signed-off-by: Murphy <[email protected]> Co-authored-by: Murphy <[email protected]> Co-authored-by: Murphy <[email protected]>
Signed-off-by: Murphy <[email protected]> (cherry picked from commit 0c0ea45) Signed-off-by: Murphy <[email protected]>
…51799) (#52766) Signed-off-by: Murphy <[email protected]>
Why I'm doing:
When scale-in the cluster from 3 nodes to 1 node:
_statistics_
database will have 3 replicas, they would stop the scale-inWhat I'm doing:
Auto change replication_num of several system tables
Affected system tables:
column_statistics
histogram_statistics
table_statistic_v1
external_column_statistics
external_histogram_statistics
pipe_file_list
loads_history
task_run_history
Behavior change:
Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: