massakam commented on issue #2289: Broker suddenly goes down
   - This phenomenon occured only once in v2.0.1, but occured many times in 
v1.22.1. So each cause may be different.
   - v1.22.1 broker goes down when splitting and unloading a bundle. v2.0.1 and 
v1.21.0 do not go down.
   - The following is a thread dump right before v1.22.1 broker goes down.
   - This phenomenon does not occur if v1.22.1 is modified as follows:
   @@ -22,6 +22,7 @@ import static;
    import static;
    import static java.lang.String.format;
    import static java.util.concurrent.TimeUnit.SECONDS;
   +import static org.apache.bookkeeper.mledger.util.SafeRun.safeRun;
    import static;
    import static;
    import static 
   @@ -596,7 +597,7 @@ public class NamespaceService {
                    updateNamespaceBundles(nsname, splittedBundles.getLeft(),
   -                    (rc, path, zkCtx, stat) ->  {
   +                    (rc, path, zkCtx, stat) -> 
pulsar.getOrderedExecutor().submit(safeRun(() -> {
                            if (rc == Code.OK.intValue()) {
                                // invalidate cache as zookeeper has new split
                                // namespace bundle
   @@ -618,7 +619,7 @@ public class NamespaceService {
   -                    });
   +                    })));
                } catch (Exception e) {
                    String msg = format("failed to acquire ownership of split 
bundle for namespace [%s], %s",
                        nsname.toString(), e.getMessage());
   From the above, v1.22.1 broker goes down probably because the bug fixed by has recurred with the 
following two changes:

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

Reply via email to