Skip to content

fix: fix race in Uuids.ClockSeqAndNodeContainer double-checked init#2050

Merged
absurdfarce merged 1 commit into
apache:4.xfrom
jasonk000:jkoch/uuids-initialize-ordering
Mar 6, 2026
Merged

fix: fix race in Uuids.ClockSeqAndNodeContainer double-checked init#2050
absurdfarce merged 1 commit into
apache:4.xfrom
jasonk000:jkoch/uuids-initialize-ordering

Conversation

@jasonk000

Copy link
Copy Markdown
Contributor

Reordered writes in ClockSeqAndNodeContainer.get() to assign val before setting the volatile initialized flag.

The updated sequence ensures val is fully constructed and visible before publication via the volatile write.

@lukasz-antoniak lukasz-antoniak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the patch!

@lukasz-antoniak

Copy link
Copy Markdown
Member

Can you just change commit message to ninjafix: Fix race condition in ClockSeqAndNodeContainer?

@lukasz-antoniak lukasz-antoniak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good catch, just please change commit message. I do not think we need a JIRA for such a small change.

@jasonk000 jasonk000 force-pushed the jkoch/uuids-initialize-ordering branch from c475bf7 to ca7ed6b Compare February 24, 2026 14:57
@jasonk000

Copy link
Copy Markdown
Contributor Author

@lukasz-antoniak done!

@lukasz-antoniak

Copy link
Copy Markdown
Member

Just the one-line ninjafix is enought :). Sorry for being strict on this. We usually describe high level changes in commits for really impactful updates to driver behaviour.

@jasonk000 jasonk000 force-pushed the jkoch/uuids-initialize-ordering branch from ca7ed6b to 6798e1e Compare February 24, 2026 15:59
@jasonk000

Copy link
Copy Markdown
Contributor Author

@lukasz-antoniak done done! =)

@absurdfarce

Copy link
Copy Markdown
Contributor

Good find @jasonk000! I've kicked off a Jenkins run just to confirm that there aren't any unexpected downstream effects from this change but I'm not expecting anything interesting to pop up there. Assuming that's good I think we'll be okay to get this merged!

@absurdfarce

absurdfarce commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

Jenkins run is clean, I think we're good here.

Thanks for the good work @jasonk000!

patch by Jason Koch; reviewed by Lukasz Antoniak and Bret McGuire
reference: apache#2050
@absurdfarce absurdfarce force-pushed the jkoch/uuids-initialize-ordering branch from 6798e1e to f777d71 Compare March 6, 2026 21:26
@absurdfarce absurdfarce merged commit 27e2bfa into apache:4.x Mar 6, 2026
1 check was pending
@jasonk000 jasonk000 deleted the jkoch/uuids-initialize-ordering branch March 6, 2026 21:55
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.

3 participants