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

Should return primary key when key is contained in WriteSet and ReadSet but the result in ReadSet is empty in Consensus Commit #535

Merged
merged 1 commit into from
Mar 28, 2022

Conversation

brfrn169
Copy link
Collaborator

Currently, when a key is contained in WriteSet and ReadSet but the result in ReadSet is empty, it doesn't return primary key, which is not expected behavior. This PR fixes this issue.

Note that this bug is only in the branch 3.5, but the master branch doesn't have it. So this bug fix is only for the branch 3.5.

Please take a look!

…et but the result in ReadSet is empty in Consensus Commit
@brfrn169 brfrn169 requested a review from feeblefakie March 27, 2022 06:12
@brfrn169 brfrn169 self-assigned this Mar 27, 2022
Comment on lines +482 to +483
put.getPartitionKey().get().forEach(v -> tmp.put(v.getName(), v));
put.getClusteringKey().ifPresent(c -> c.get().forEach(v -> tmp.put(v.getName(), v)));
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This logic includes the primary key into values when the result in the read set is empty.

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!

@feeblefakie feeblefakie merged commit 3465059 into 3.5 Mar 28, 2022
@feeblefakie feeblefakie deleted the should-return-primary-key branch March 28, 2022 00:37
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.

2 participants