This is an automated email from the ASF dual-hosted git repository.
penghui pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.6 by this push:
new 1d82d22 add if for SubscriptionBusyException (#9017)
1d82d22 is described below
commit 1d82d22ac0cacb137a15d155021d6b77062666e8
Author: cimura <[email protected]>
AuthorDate: Wed Dec 23 02:50:53 2020 +0900
add if for SubscriptionBusyException (#9017)
when `SubscriptionBusyException` is thrown in a broker,
`getClientErrorCode` doesn't deal with it and the returned code is incorrect.
add `else if` for `SubscriptionBusyException` in `getClientErrorCode`
- [x] Make sure that the change passes the CI checks.
This change is a trivial rework / code cleanup without any test coverage.
(cherry picked from commit 973c14e1bd429946fc9008eabedab9e734fb07c6)
---
.../java/org/apache/pulsar/broker/service/BrokerServiceException.java | 2 ++
1 file changed, 2 insertions(+)
diff --git
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerServiceException.java
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerServiceException.java
index 7ec97ff..fc31ac3 100644
---
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerServiceException.java
+++
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerServiceException.java
@@ -190,6 +190,8 @@ public class BrokerServiceException extends Exception {
return PulsarApi.ServerError.PersistenceError;
} else if (t instanceof ConsumerBusyException) {
return PulsarApi.ServerError.ConsumerBusy;
+ } else if (t instanceof SubscriptionBusyException) {
+ return PulsarApi.ServerError.ConsumerBusy;
} else if (t instanceof UnsupportedVersionException) {
return PulsarApi.ServerError.UnsupportedVersionError;
} else if (t instanceof TooManyRequestsException) {