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

[fix](catalog) fix bug that replica missing version cause query -214 error #9266

Merged
merged 3 commits into from
May 3, 2022

Conversation

morningman
Copy link
Contributor

@morningman morningman commented Apr 27, 2022

Proposed changes

Issue Number: close #9267

Problem Summary:

This CL mainly change:

  1. Fix bug described in [Bug] failed to initialize storage reader. tablet=924991.xxxx, res=-214, backend=xxxx #9267
    When report missing version replica, set last failed version to (replica version + 1)
  2. Skip non-exist partition when handling transactions.

Checklist(Required)

  1. Does it affect the original behavior: (No)
  2. Has unit tests been added: (No Need)
  3. Has document been added or modified: (No Need)
  4. Does it need to update dependencies: (No)
  5. Are there any changes that cannot be rolled back: (No)

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@morningman morningman added kind/fix Categorizes issue or PR as related to a bug. area/catalog Issues or PRs related to catalog management labels Apr 27, 2022
// the replica is normal, then remove it from error replica ids
errorReplicaIds.remove(replica.getId());
&& replica.getLastFailedVersion() < 0
&& replica.checkVersionCatchUp(partition.getVisibleVersion(), true)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For reviewer: Remove this part because we will update the replica version in updateCatalogAfterVisible(), so no need to update here.

@@ -831,8 +831,12 @@ private static void handleRecoverTablet(ListMultimap<Long, Long> tabletRecoveryM
// The absolute value is meaningless, as long as it is greater than 0.
Copy link
Contributor

Choose a reason for hiding this comment

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

delete or update the comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

}
} else if (replica.getVersion() >= partitionCommitInfo.getVersion()) {
// the replica's version is larger than or equal to current transaction partition's version
// the replica is normal, then remove it from error replica ids
Copy link
Contributor

Choose a reason for hiding this comment

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

This logic is not covered by updateCatalogAfterVisible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added it back

@morningman morningman added the dev/1.0.1-deprecated should be merged into dev-1.0.1 branch label Apr 29, 2022
Copy link
Contributor

@hf200012 hf200012 left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label May 2, 2022
@github-actions
Copy link
Contributor

github-actions bot commented May 2, 2022

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

github-actions bot commented May 2, 2022

PR approved by anyone and no changes requested.

@morningman morningman merged commit dcf5f78 into apache:master May 3, 2022
stalary pushed a commit to stalary/doris that referenced this pull request May 5, 2022
…error (apache#9266)

1. Fix bug described in apache#9267 
    When report missing version replica, set last failed version to (replica version + 1)
2. Skip non-exist partition when handling transactions.
@morningman morningman added dev/merged-1.0.1-deprecated PR has been merged into dev-1.0.1 and removed dev/1.0.1-deprecated should be merged into dev-1.0.1 branch labels May 6, 2022
morningman added a commit that referenced this pull request May 6, 2022
…error (#9266)

1. Fix bug described in #9267 
    When report missing version replica, set last failed version to (replica version + 1)
2. Skip non-exist partition when handling transactions.
Kikyou1997 pushed a commit to Kikyou1997/incubator-doris that referenced this pull request May 9, 2022
…error (apache#9266)

1. Fix bug described in apache#9267 
    When report missing version replica, set last failed version to (replica version + 1)
2. Skip non-exist partition when handling transactions.
starocean999 pushed a commit to starocean999/incubator-doris that referenced this pull request May 19, 2022
…error (apache#9266)

1. Fix bug described in apache#9267 
    When report missing version replica, set last failed version to (replica version + 1)
2. Skip non-exist partition when handling transactions.
englefly pushed a commit to englefly/incubator-doris that referenced this pull request May 23, 2022
…error (apache#9266)

1. Fix bug described in apache#9267 
    When report missing version replica, set last failed version to (replica version + 1)
2. Skip non-exist partition when handling transactions.
@morningman morningman mentioned this pull request Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. area/catalog Issues or PRs related to catalog management dev/merged-1.0.1-deprecated PR has been merged into dev-1.0.1 kind/fix Categorizes issue or PR as related to a bug. reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] failed to initialize storage reader. tablet=924991.xxxx, res=-214, backend=xxxx
3 participants