Skip to content

OF-3358: Publish the SASL mechanism registry as an immutable snapshot - #3476

Merged
guusdk merged 1 commit into
igniterealtime:mainfrom
guusdk:OF-3358_SASLMechanism-init-concurrency
Sep 8, 2026
Merged

OF-3358: Publish the SASL mechanism registry as an immutable snapshot#3476
guusdk merged 1 commit into
igniterealtime:mainfrom
guusdk:OF-3358_SASLMechanism-init-concurrency

Conversation

@guusdk

@guusdk guusdk commented Sep 2, 2026

Copy link
Copy Markdown
Member

initMechanisms assigned an empty set and then filled it, so a concurrent reader could observe a partial mechanism list. The field was not volatile either, giving readers no happens-before edge to a writer at all.

The registry is now replaced wholesale rather than mutated in place, and the three writers are synchronized. Readers are unchanged.

initMechanisms assigned an empty set and then filled it, so a concurrent reader could observe a partial mechanism list. The field was not volatile either, giving readers no happens-before edge to a writer at all.

The registry is now replaced wholesale rather than mutated in place, and the three writers are synchronized. Readers are unchanged.
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: c93c9bc8-c128-406c-bcb0-fc6b57733105

📥 Commits

Reviewing files that changed from the base of the PR and between 23b01a2 and 50d31cd.

📒 Files selected for processing (1)
  • xmppserver/src/main/java/org/jivesoftware/openfire/sasl/SaslMechanismCatalog.java

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

SaslMechanismCatalog now stores mechanisms in a volatile immutable set. Synchronized add, remove, and initialization operations create and publish replacement sets. Initialization skips null or empty configured names with a warning, uppercases valid names, and logs them before publishing the rebuilt set.

Merge Risk: ⚪ Minimal · up to 50d31

The PR publishes complete immutable SASL mechanism snapshots and serializes updates, preventing readers from observing partially initialized configuration without changing authentication controls. No actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description directly explains the SASL mechanism registry changes, including immutable snapshot publication, synchronization, and concurrent reader safety.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Fishbowler Fishbowler 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.

LGTM! Nice catch!

@guusdk
guusdk merged commit 8252a81 into igniterealtime:main Sep 8, 2026
43 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