You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/06/27 07:19:55 UTC

[GitHub] [bookkeeper] horizonzy commented on a diff in pull request #3361: Fix autoRecover memory leak.

horizonzy commented on code in PR #3361:
URL: https://github.com/apache/bookkeeper/pull/3361#discussion_r907052855


##########
bookkeeper-server/src/test/java/org/apache/bookkeeper/meta/AbstractZkLedgerManagerTest.java:
##########
@@ -824,9 +824,16 @@ public void testUnregisterLedgerMetadataListener() throws Exception {
             ledgerStr, true,
             KeeperException.Code.OK.intValue(), serDe.serialize(metadata), stat);
 
+        mockZkRemoveWatcher();
+
         // unregister the listener
         ledgerManager.unregisterLedgerMetadataListener(ledgerId, listener);
         assertFalse(ledgerManager.listeners.containsKey(ledgerId));
+        assertFalse(watchers.containsKey(ledgerStr));
+        verify(mockZk, times(1)).removeWatches(any(String.class),

Review Comment:
   good suggestion. 👍



-- 
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: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org