-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix][broker] Ensure that PulsarService is ready for serving incoming requests #22977
[fix][broker] Ensure that PulsarService is ready for serving incoming requests #22977
Conversation
Is this possible for us to start WebService/WebSocketService/BrokerService/ProtocolHander after the other Pulsar Services start? |
Yes, it makes sense to cover all cases in a way so that requests aren't handled before PulsarService has been started. |
49ae27c
to
1238a4f
Compare
I renamed the concept to mean that the broker is ready to serve request instead of being fully started. I believe that this covers what is really needed and the original intention of this PR. I checked the current solution and this is sufficiently covered already for the Pulsar broker with various configurations. There's no need to separately handle websockets since websocket servlets get added to the same Jetty server which already contains the filter to wait until PulsarService is ready for incoming requests. ProtocolHandlers don't need any special handling since they get started as the last step in PulsarService. |
1238a4f
to
16c69f1
Compare
16c69f1
to
09a46e4
Compare
@heesung-sn I pushed an attempt to make this solution work with ExtensibleLoadManagerImpl. |
14c17a0
to
3ab5526
Compare
3ab5526
to
fc593e7
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #22977 +/- ##
============================================
- Coverage 73.57% 73.39% -0.18%
- Complexity 32624 32915 +291
============================================
Files 1877 1903 +26
Lines 139502 142711 +3209
Branches 15299 15571 +272
============================================
+ Hits 102638 104749 +2111
- Misses 28908 29941 +1033
- Partials 7956 8021 +65
Flags with carried forward coverage won't be shown. Click here to find out more.
|
… requests (apache#22977) (cherry picked from commit 53df683)
… requests (apache#22977) (cherry picked from commit 53df683)
… requests (apache#22977) (cherry picked from commit 53df683) (cherry picked from commit ec51420)
… requests (apache#22977) (cherry picked from commit 53df683)
… requests (apache#22977) (cherry picked from commit 53df683)
… requests (apache#22977) (cherry picked from commit 53df683)
… requests (apache#22977) (cherry picked from commit 53df683) (cherry picked from commit ec51420)
… requests (apache#22977) (cherry picked from commit 53df683) (cherry picked from commit ec51420)
… requests (apache#22977) (cherry picked from commit 53df683)
…incoming requests (apache#22977)" This reverts commit 598e073.
… requests (apache#22977) (cherry picked from commit 53df683) (cherry picked from commit ec51420)
… requests (apache#22977) (cherry picked from commit 53df683) (cherry picked from commit ec51420) (cherry picked from commit 1a7eb54)
… requests (apache#22977) (cherry picked from commit 53df683) (cherry picked from commit ec51420) (cherry picked from commit 1a7eb54)
Fixes #22975
Motivation
Pulsar broker will start serving requests while the broker is starting. This can cause issues and bugs which are hard to reproduce. Serving requests should be delayed until the broker is ready.
The
brokerId
bug #22975 is just one example of problems that this PR will address.Modifications
Documentation
doc
doc-required
doc-not-needed
doc-complete