You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by pe...@apache.org on 2021/11/18 09:31:32 UTC

[pulsar] 09/12: [Java Client] Let producer reconnect for state RegisteringSchema (#12781)

This is an automated email from the ASF dual-hosted git repository.

penghui pushed a commit to branch branch-2.8
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit d09854f868eb28067da8ed62b14df7f013b8ba32
Author: Michael Marshall <mi...@datastax.com>
AuthorDate: Mon Nov 15 01:39:45 2021 -0600

    [Java Client] Let producer reconnect for state RegisteringSchema (#12781)
    
    Motivation
    In the Java Client, if a producer is in the RegisteringSchema state, it is a valid state for it to reconnect. Fix the ConnectionHandler to align with this behavior.
    
    Modifications
    Update the isValidStateForReconnection method to return true for state RegisteringSchema.
    Verifying this change
    This change is a trivial rework / code cleanup without any test coverage.
    
    Does this pull request potentially affect one of the following parts:
    This update does not contain breaking changes.
    
    (cherry picked from commit 8d75eedbf6a37c1e77f6c5b6eac080ae00b77768)
---
 .../src/main/java/org/apache/pulsar/client/impl/ConnectionHandler.java   | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionHandler.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionHandler.java
index 8fb7ab4..13de530 100644
--- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionHandler.java
+++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionHandler.java
@@ -152,6 +152,7 @@ public class ConnectionHandler {
         switch (state) {
             case Uninitialized:
             case Connecting:
+            case RegisteringSchema:
             case Ready:
                 // Ok
                 return true;