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

[MINOR] fix: Get and increment ATOMIC_LONG in that order everywhere #1496

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

EnricoMi
Copy link
Contributor

What changes were proposed in this pull request?

Make ShuffleReadClientImplTest.writeDuplicatedData call ATOMIC_LONG.getAndIncrement, rather than ATOMIC_LONG.incrementAndGet.

Why are the changes needed?

In ShuffleReadClientImplTest

  • method writeTestData calls ATOMIC_LONG.getAndIncrement()
  • method writeDuplicatedData calls ATOMIC_LONG.incrementAndGet()

Calling writeTestData after writeDuplicatedData produces a duplicate sequence number, which is unexpected. All code paths in ShuffleReadClientImplTest that increment ATOMIC_LONG should use the same order of get and increment.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Manually.

Copy link
Member

@zuston zuston left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @EnricoMi

@zuston zuston merged commit 3326272 into apache:master Feb 1, 2024
36 checks passed
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.

2 participants