[fix][ws] Fix issue where metadataStoreAllowReadOnlyOperations setting is ignored by WebSocket server - #25281
Merged
Conversation
…ed by WebSocket server
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #25281 +/- ##
============================================
- Coverage 72.91% 72.62% -0.30%
+ Complexity 34577 33929 -648
============================================
Files 1959 1959
Lines 155543 155543
Branches 17741 17741
============================================
- Hits 113421 112963 -458
- Misses 33185 33568 +383
- Partials 8937 9012 +75
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
codelipenghui
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Brokers and proxies can continue to provide services even if more than half of the ZooKeeper servers acting as configuration metadata store go down and switch to read-only mode by writing
metadataStoreAllowReadOnlyOperations=truein their configuration files.metadataStoreAllowReadOnlyOperationsto deprecatezookeeperAllowReadOnlyOperations#19246On the other hand, WebSocket servers could not continue to provide services even though
metadataStoreAllowReadOnlyOperations=truewas written in the configuration file.This is because the
metadataStoreAllowReadOnlyOperationsfield exists in the ServiceConfiguration and ProxyConfiguration classes, but not in the WebSocketProxyConfiguration class.Modifications
Added the
metadataStoreAllowReadOnlyOperationsfield to theWebSocketProxyConfigurationclass.Verifying this change
Documentation
docdoc-requireddoc-not-neededdoc-complete