You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/04/26 07:15:24 UTC
[GitHub] [pulsar] rdhabalia opened a new pull request #10374: [pulsar-broker] Fix: handle failed partitions topic creation
rdhabalia opened a new pull request #10374:
URL: https://github.com/apache/pulsar/pull/10374
### Motivation
Incrementing partition for the topic requires creating new partitions with existing subscriptions. Sometimes, partitions of the topic are distributed to multiple brokers, and the creation of few partitions may fail due to various reasons. However, retrying update-partition command for such topic fails with the below error
```
Caused by: org.apache.pulsar.client.admin.PulsarAdminException$ConflictException: Subscription already exists for topic
at org.apache.pulsar.client.admin.internal.BaseResource.getApiException(BaseResource.java:219) ~[classes/:?]
at org.apache.pulsar.client.admin.internal.BaseResource$1.failed(BaseResource.java:129) ~[classes/:?]
at org.glassfish.jersey.client.JerseyInvocation$1.failed(JerseyInvocation.java:839) ~[jersey-client-2.31.jar:?]
at org.glassfish.jersey.client.JerseyInvocation$1.completed(JerseyInvocation.java:820) ~[jersey-client-2.31.jar:?]
at org.glassfish.jersey.client.ClientRuntime.processResponse(ClientRuntime.java:229) ~[jersey-client-2.31.jar:?]
at org.glassfish.jersey.client.ClientRuntime.access$200(ClientRuntime.java:62) ~[jersey-client-2.31.jar:?]
at org.glassfish.jersey.client.ClientRuntime$2.lambda$response$0(ClientRuntime.java:173) ~[jersey-client-2.31.jar:?]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248) ~[jersey-common-2.31.jar:?]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244) ~[jersey-common-2.31.jar:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:292) ~[jersey-common-2.31.jar:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:274) ~[jersey-common-2.31.jar:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:244) ~[jersey-common-2.31.jar:?]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:288) ~[jersey-common-2.31.jar:?]
at org.glassfish.jersey.client.ClientRuntime$2.response(ClientRuntime.java:173) ~[jersey-client-2.31.jar:?]
at org.apache.pulsar.client.admin.internal.http.AsyncHttpConnector.lambda$0(AsyncHttpConnector.java:212) ~[classes/:?]
```
We frequently face this issue and need to manually update znode to fix the issue and increment partitions of the topic.
### Modification
Handle `Subscription already exists for topic` error and create failed partitions to successfully increment partitions. Provide `force` flag to handle the error and successfully create partially created partitons.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] eolivelli commented on a change in pull request #10374: [pulsar-broker] Fix: handle failed partitions topic creation
Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #10374:
URL: https://github.com/apache/pulsar/pull/10374#discussion_r642940295
##########
File path: pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Topics.java
##########
@@ -445,10 +445,11 @@
* Number of new partitions of already exist partitioned-topic
* @param updateLocalTopicOnly
* Used by broker for global topic with multiple replicated clusters
- *
+ * @param force
+ * Update forcefully without validating existing partitioned topic
* @returns a future that can be used to track when the partitioned topic is updated
*/
- void updatePartitionedTopic(String topic, int numPartitions, boolean updateLocalTopicOnly)
+ void updatePartitionedTopic(String topic, int numPartitions, boolean updateLocalTopicOnly, boolean force)
Review comment:
it looks like we are dropping an API method.
we should keep the existing method, and add a new one that falls back to the new method, with force=false
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] rdhabalia commented on pull request #10374: [pulsar-broker] Fix: handle failed partitions topic creation
Posted by GitBox <gi...@apache.org>.
rdhabalia commented on pull request #10374:
URL: https://github.com/apache/pulsar/pull/10374#issuecomment-839922701
/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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] rdhabalia merged pull request #10374: [pulsar-broker] Fix: handle failed partitions topic creation
Posted by GitBox <gi...@apache.org>.
rdhabalia merged pull request #10374:
URL: https://github.com/apache/pulsar/pull/10374
--
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] rdhabalia merged pull request #10374: [pulsar-broker] Fix: handle failed partitions topic creation
Posted by GitBox <gi...@apache.org>.
rdhabalia merged pull request #10374:
URL: https://github.com/apache/pulsar/pull/10374
--
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