Skip to content

[fix][ws] Fix issue where metadataStoreAllowReadOnlyOperations setting is ignored by WebSocket server - #25281

Merged
codelipenghui merged 1 commit into
apache:masterfrom
massakam:add-zk-conf-to-ws
Mar 5, 2026
Merged

[fix][ws] Fix issue where metadataStoreAllowReadOnlyOperations setting is ignored by WebSocket server#25281
codelipenghui merged 1 commit into
apache:masterfrom
massakam:add-zk-conf-to-ws

Conversation

@massakam

@massakam massakam commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

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=true in their configuration files.

On the other hand, WebSocket servers could not continue to provide services even though metadataStoreAllowReadOnlyOperations=true was written in the configuration file.

This is because the metadataStoreAllowReadOnlyOperations field exists in the ServiceConfiguration and ProxyConfiguration classes, but not in the WebSocketProxyConfiguration class.

Modifications

Added the metadataStoreAllowReadOnlyOperations field to the WebSocketProxyConfiguration class.

Verifying this change

  • Make sure that the change passes the CI checks.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@massakam massakam self-assigned this Mar 4, 2026
@massakam massakam added type/bug The PR fixed a bug or issue reported a bug area/websocket doc-not-needed Your PR changes do not impact docs ready-to-test labels Mar 4, 2026
@massakam massakam changed the title [fix][websocket] Fix issue where metadataStoreAllowReadOnlyOperations setting is ignored by WebSocket server [fix][ws] Fix issue where metadataStoreAllowReadOnlyOperations setting is ignored by WebSocket server Mar 4, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.62%. Comparing base (d992dc5) to head (3a938ea).

Additional details and impacted files

Impacted file tree graph

@@             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     
Flag Coverage Δ
inttests 25.71% <ø> (-0.53%) ⬇️
systests 22.32% <ø> (-0.28%) ⬇️
unittests 73.58% <ø> (-0.30%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...websocket/service/WebSocketProxyConfiguration.java 100.00% <ø> (ø)

... and 112 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codelipenghui codelipenghui added this to the 4.2.0 milestone Mar 5, 2026
@codelipenghui
codelipenghui merged commit e44f36a into apache:master Mar 5, 2026
105 of 114 checks passed
@massakam
massakam deleted the add-zk-conf-to-ws branch March 5, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/websocket doc-not-needed Your PR changes do not impact docs ready-to-test type/bug The PR fixed a bug or issue reported a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants