-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[bugfix](tablet)fix the tablet will be deleted when clone due to concurrency #25784
Closed
neuyilan
wants to merge
6
commits into
apache:master
from
neuyilan:dev2/qhl/master_fix_tablet_delete
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
12456d7
fix the tablet will be deleted when clone due to concurrency
neuyilan cbddcd8
fix the tablet will be deleted when clone due to concurrency
neuyilan 54ebe03
fix the tablet will be deleted when clone due to concurrency
neuyilan c178d74
fix the tablet will be deleted when clone due to concurrency
neuyilan 5837ddf
fix the tablet will be deleted when clone due to concurrency
neuyilan 5bbc441
fix the tablet will be deleted when clone due to concurrency
neuyilan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -784,16 +784,17 @@ private static void deleteFromMeta(ListMultimap<Long, Long> tabletDeleteFromMeta | |
continue; | ||
} | ||
|
||
BinlogConfig binlogConfig = new BinlogConfig(olapTable.getBinlogConfig()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why move these two lines ahead ? |
||
|
||
ReplicaState state = replica.getState(); | ||
|
||
// check report version again | ||
long currentBackendReportVersion = Env.getCurrentSystemInfo() | ||
.getBackendReportVersion(backendId); | ||
if (backendReportVersion < currentBackendReportVersion) { | ||
continue; | ||
} | ||
|
||
BinlogConfig binlogConfig = new BinlogConfig(olapTable.getBinlogConfig()); | ||
|
||
ReplicaState state = replica.getState(); | ||
if (state == ReplicaState.NORMAL || state == ReplicaState.SCHEMA_CHANGE) { | ||
// if state is PENDING / ROLLUP / CLONE | ||
// it's normal that the replica is not created in BE but exists in meta. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
line 1914, 1917: only clone a not exisist replica can add s_report_version and report s_report_version.
Because for clone a existsing replica, the report tablet no 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.
只有在clone 新副本时,增加_s_report_version和上报_s_report_version。
对于已有的副本clone时,不要修改_s_report_version也不要上报它。 因为对一个已存在的tablet 增量clone,不会出现issue所说的问题。
假如增量clone时增大_s_report_version时,会有一个问题:它增大s_report_version,可能会导致fe丢弃上一个BE tablet report(旧report version)。进入会存在这样的情况:假如BE很多增量clone, 那FE会频繁丢弃这个BE 的tablet report。