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 NullPointerException in EXTRA_READ validation #1624

Merged
merged 2 commits into from
Apr 13, 2024

Conversation

brfrn169
Copy link
Collaborator

@brfrn169 brfrn169 commented Apr 4, 2024

Description

This PR fixes a bug in the EXTRA_READ validation. In this bug, NullPointerException occurs during the EXTRA_READ validation when scanning records in a transaction, but some of them are deleted by other transactions.

Related issues and/or PRs

N/A

Changes made

  • Changed Optional.of() to Optional.ofNullable() in Snapshot.toSerializableWithExtraRead() to avoid NullPointerException

Checklist

  • 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)

N/A

Release notes

Fixed a bug where NullPointerException occurs during the EXTRA_READ validation when scanning records in a transaction, but some of them are deleted by other transactions.

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! Thank you!

Copy link
Contributor

@jnmt jnmt 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 for fixing this. Sorry for keeping it on hold. I no longer have to hurry for my experiments, but let's discuss how we handle it in a better way when we get a chance.

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!

@brfrn169 brfrn169 merged commit 10b8687 into master Apr 13, 2024
23 checks passed
@brfrn169 brfrn169 deleted the fix-npe-in-extra-read-validation branch April 13, 2024 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants