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

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

commit f047b5a109d117e8b62d3a2d3e37929187d101ff
Author: Michael Marshall <[email protected]>
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 9babd2a..02429d2 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
@@ -156,6 +156,7 @@ public class ConnectionHandler {
         switch (state) {
             case Uninitialized:
             case Connecting:
+            case RegisteringSchema:
             case Ready:
                 // Ok
                 return true;

Reply via email to