You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "wolfstudy (via GitHub)" <gi...@apache.org> on 2023/04/17 06:29:25 UTC
[GitHub] [pulsar] wolfstudy opened a new pull request, #20113: [Improve] Fix broker restart logic
wolfstudy opened a new pull request, #20113:
URL: https://github.com/apache/pulsar/pull/20113
### Motivation
Currently, when we execute the logic of Broker Close, we first shut down the Broker Service, and then close the LoadManagerTask. This will cause the Broker to be assigned to a new bundle during the shutdown of the Broker, resulting in an inelegant shutdown of the Broker. , eventually triggering brokerShutdownTimeoutMs to forcibly shut down the Broker, causing the Client to fail to produce or consume messages over time.

When shutting down the Broker, we will first remove the temporary node of the current Broker from zookeeper, which is the logic we expect. We expect that the broker will not allocate new bundles during active shutdown of the broker. However, since the task of loadManagerExecutor has been regularly executed to report its own Load information to zookeeper, this will cause the Broker node to be shut down to be re-registered by loadManagerExecutor. At this time, the Leader Broker believes that the Broker node to be shut down can also allocate a new bundle, and will redistribute the new bundle information.
Interestingly, in the code logic of Pulsar Service shutdown, the comments clearly indicate that we expect LoadMangerTask to be closed before Broker Service, but in real code implementation, it is the opposite.
```
// cancel loadShedding task and shutdown the loadManager executor before shutting down the broker
```
### Modifications
Adjust the order of component shutdown when Broker is shut down so that LoadManagerTask is shut down before Broker Service
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] wolfstudy commented on pull request #20113: [Improve] Fix broker restart logic
Posted by "wolfstudy (via GitHub)" <gi...@apache.org>.
wolfstudy commented on PR #20113:
URL: https://github.com/apache/pulsar/pull/20113#issuecomment-1511157993
/pulsarbot run-failure-checks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codecov-commenter commented on pull request #20113: [improve] [broker] Fix broker restart logic
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #20113:
URL: https://github.com/apache/pulsar/pull/20113#issuecomment-1511209994
## [Codecov](https://codecov.io/gh/apache/pulsar/pull/20113?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#20113](https://codecov.io/gh/apache/pulsar/pull/20113?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5a4dff4) into [master](https://codecov.io/gh/apache/pulsar/commit/c4aec6661e795c46181dc1fa79282065fa875768?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c4aec66) will **increase** coverage by `39.78%`.
> The diff coverage is `100.00%`.
[](https://codecov.io/gh/apache/pulsar/pull/20113?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #20113 +/- ##
=============================================
+ Coverage 33.16% 72.94% +39.78%
- Complexity 12225 31911 +19686
=============================================
Files 1499 1868 +369
Lines 114340 138318 +23978
Branches 12415 15214 +2799
=============================================
+ Hits 37918 100897 +62979
+ Misses 71484 29398 -42086
- Partials 4938 8023 +3085
```
| Flag | Coverage Δ | |
|---|---|---|
| inttests | `24.18% <0.00%> (?)` | |
| systests | `24.87% <0.00%> (?)` | |
| unittests | `72.23% <100.00%> (+39.07%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/pulsar/pull/20113?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...n/java/org/apache/pulsar/broker/PulsarService.java](https://codecov.io/gh/apache/pulsar/pull/20113?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9QdWxzYXJTZXJ2aWNlLmphdmE=) | `81.63% <100.00%> (+25.30%)` | :arrow_up: |
| [...e/pulsar/io/elasticsearch/ElasticSearchConfig.java](https://codecov.io/gh/apache/pulsar/pull/20113?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWlvL2VsYXN0aWMtc2VhcmNoL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9wdWxzYXIvaW8vZWxhc3RpY3NlYXJjaC9FbGFzdGljU2VhcmNoQ29uZmlnLmphdmE=) | `90.67% <100.00%> (ø)` | |
... and [1540 files with indirect coverage changes](https://codecov.io/gh/apache/pulsar/pull/20113/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on pull request #20113: [Improve] Fix broker restart logic
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20113:
URL: https://github.com/apache/pulsar/pull/20113#issuecomment-1510779354
@wolfstudy Please add the following content to your PR description and select a checkbox:
```
- [ ] `doc` <!-- Your PR contains doc changes -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codelipenghui merged pull request #20113: [improve] [broker] Fix broker restart logic
Posted by "codelipenghui (via GitHub)" <gi...@apache.org>.
codelipenghui merged PR #20113:
URL: https://github.com/apache/pulsar/pull/20113
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on pull request #20113: [Improve] Fix broker restart logic
Posted by "codelipenghui (via GitHub)" <gi...@apache.org>.
codelipenghui commented on PR #20113:
URL: https://github.com/apache/pulsar/pull/20113#issuecomment-1511008389
/pulsarbot run-failure-checks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org