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 2019/10/07 20:45:06 UTC

[GitHub] [pulsar] rdhabalia commented on a change in pull request #5322: Fix bk write failure part 2

rdhabalia commented on a change in pull request #5322: Fix bk write failure part 2
URL: https://github.com/apache/pulsar/pull/5322#discussion_r332227446
 
 

 ##########
 File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
 ##########
 @@ -342,15 +345,13 @@ public void addComplete(Position pos, Object ctx) {
 
     @Override
     public synchronized void addFailed(ManagedLedgerException exception, Object ctx) {
-
-        // fence topic when failed to write a message to BK
-        isFenced = true;
-
         if (exception instanceof ManagedLedgerFencedException) {
             // If the managed ledger has been fenced, we cannot continue using it. We need to close and reopen
             close();
         } else {
 
+            // fence topic when failed to write a message to BK
+            isFenced = true;
 
 Review comment:
   why are we avoiding fencing ledger when topic actually sees `ManagedLedgerFencedException`

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


With regards,
Apache Git Services