Skip to content

Conversation

@dajac
Copy link
Member

@dajac dajac commented Nov 28, 2025

I found those two cases while working in this area. In both cases, they
are read by multiple threads so they must either be volatile or
acquiring the appropriate lock. Using volatile is fine here.

Reviewers: Lianet Magrans [email protected]

@dajac dajac requested review from chia7712 and lianetm November 28, 2025 08:24
Copy link
Member

@lianetm lianetm left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM.

@dajac dajac merged commit 358dc27 into apache:4.2 Nov 28, 2025
20 checks passed
@dajac dajac deleted the 4.2-fix-volatile branch November 28, 2025 14:56
Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

LGTM. @dajac would you mind also backporting this change to 4.1? I tried to cherry-pick it myself but it failed

* This is initialised when the {@link GroupCoordinator#onNewMetadataImage(CoordinatorMetadataImage, CoordinatorMetadataDelta)} is called
*/
private CoordinatorMetadataImage metadataImage = null;
private volatile CoordinatorMetadataImage metadataImage = null;
Copy link
Member

Choose a reason for hiding this comment

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

I assume those changes are bug fixes, and the 4.1 branch may have a next release.

Copy link
Member

Choose a reason for hiding this comment

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

It seems trunk is missing this fix. @majialong could you file a minor patch for trunk?

Copy link
Contributor

Choose a reason for hiding this comment

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

Open #21021 for this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Trunk is covered by #21008.

@chia7712
Copy link
Member

open #21020 for the backport

@dajac
Copy link
Member Author

dajac commented Nov 30, 2025

Sorry guys. I wanted to follow-up on this on Monday (due to the weekend). You got there before I could. Thanks!

chia7712 pushed a commit that referenced this pull request Dec 1, 2025
…21023)

backport #21014.

In 4.0, `MetadataImage` has not yet been introduced into
`GroupCoordinatorService`. Therefore, this patch only includes changes
to `CoordinatorRuntime`.

Reviewers: Chia-Ping Tsai <[email protected]>
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