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 read records #132

Merged
merged 7 commits into from
Nov 6, 2024
Merged

Fix read records #132

merged 7 commits into from
Nov 6, 2024

Conversation

yito88
Copy link
Member

@yito88 yito88 commented Oct 29, 2024

Description

Try to read each account with retries.
Basically, the backoff retry is to wait for the DB bootstrapping after the nemesis, not to recover these records. When some records needed to be recovered, e.g. all 10 records, the test failed because the retry count (8) was fixed.

Related issues and/or PRs

Changes made

  • Make read-all to read each account with retries.

Checklist

The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item.

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • Tests (unit, integration, etc.) have been added for the changes.
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

@yito88 yito88 marked this pull request as ready for review November 3, 2024 20:53
Copy link
Contributor

@komamitsu komamitsu left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

Copy link
Contributor

@brfrn169 brfrn169 left a comment

Choose a reason for hiding this comment

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

Left a minor comment. Other than that, LGTM! Thank you!

(range n)))]
(.commit tx)
results)
(read-record test id)
(catch Exception e
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can catch CrudConflictException if it's for the lazy recovery. What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

@brfrn169 Another exception could be thrown from the commit, couldn't it?

Copy link
Contributor

@brfrn169 brfrn169 Nov 5, 2024

Choose a reason for hiding this comment

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

@yito88 Sorry, it seems I had the wrong idea. Please ignore the comment.

So currently, we retry all the record reads together, but after this PR, we will retry each record read individually. Is my understanding correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

@brfrn169 No problem. "read-record" tries to update, so it's a bit misleading.

we retry all the record reads together, but after this PR, we will retry each record read individually. Is my understanding correct?

Exactly!

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

@brfrn169 brfrn169 merged commit 1949e3e into master Nov 6, 2024
3 checks passed
@brfrn169 brfrn169 deleted the fix-read-records branch November 6, 2024 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants