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 2022/03/27 12:31:06 UTC

[GitHub] [pulsar] eolivelli commented on a change in pull request #14207: [Transaction] delete CoordinatorClientStateException

eolivelli commented on a change in pull request #14207:
URL: https://github.com/apache/pulsar/pull/14207#discussion_r835900427



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/transaction/TransactionCoordinatorClientImpl.java
##########
@@ -73,8 +72,8 @@ public void start() throws TransactionCoordinatorClientException {
 
     @Override
     public CompletableFuture<Void> startAsync() {
-        if (STATE_UPDATER.compareAndSet(this, State.NONE, State.STARTING)) {
-            return pulsarClient.getLookup().getPartitionedTopicMetadata(TopicName.TRANSACTION_COORDINATOR_ASSIGN)
+        STATE_UPDATER.compareAndSet(this, State.NONE, State.STARTING);

Review comment:
       We can keep the current logic but simply throw another exception, like a IllegalStateException.
   
   This way we can get rid of the redundant exception




-- 
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