Skip to content

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

Open
jasonk000 wants to merge 1 commit intoapache:4.xfrom
jasonk000:jkoch/uuids-initialize-ordering
Open

fix: fix race in Uuids.ClockSeqAndNodeContainer double-checked init#2050
jasonk000 wants to merge 1 commit intoapache:4.xfrom
jasonk000:jkoch/uuids-initialize-ordering

Conversation

@jasonk000
Copy link
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.

Copy link
Member

@lukasz-antoniak lukasz-antoniak left a comment

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
Member

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

Copy link
Member

@lukasz-antoniak lukasz-antoniak left a comment

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
Contributor Author

@lukasz-antoniak done!

@lukasz-antoniak
Copy link
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
Contributor Author

@lukasz-antoniak done done! =)

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