[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14236673#comment-14236673
 ] 

Hudson commented on BOOKKEEPER-804:
-----------------------------------

FAILURE: Integrated in bookkeeper-master #874 (See 
[https://builds.apache.org/job/bookkeeper-master/874/])
BOOKKEEPER-804: Client program is not terminated when using 
openLedgerNoRecovery (ivank via sijie) (sijie: rev 
2b88b11fa7597254ccbf828f16efc665e852788d)
* 
bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/AbstractZkLedgerManager.java
* CHANGES.txt
* 
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookKeeperCloseTest.java
* 
bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/CleanupLedgerManager.java


> Client program is not terminated when using openLedgerNoRecovery
> ----------------------------------------------------------------
>
>                 Key: BOOKKEEPER-804
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-804
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-client
>    Affects Versions: 4.3.0
>            Reporter: Youngjoon Kim
>            Assignee: Ivan Kelly
>             Fix For: 4.4.0, 4.3.1
>
>         Attachments: 
> 0001-BOOKKEEPER-804-Client-program-is-not-terminated-when.patch, 
> 0001-BOOKKEEPER-804-Client-program-is-not-terminated-when.patch, 
> 0001-BOOKKEEPER-804-Client-program-is-not-terminated-when.patch
>
>
> If a client program does some operations using a ledger handle opened by 
> openLedgerNoRecovery(), the program is not terminated after the handle and 
> bookkeeper object is closed.
> Here is a sample code. 
> {code}
> import java.util.Enumeration;
> import org.apache.bookkeeper.client.BookKeeper;
> import org.apache.bookkeeper.client.LedgerEntry;
> import org.apache.bookkeeper.client.LedgerHandle;
> public class BkClient {
>   public static void main(String[] args) {
>     try {
>       BookKeeper bk = new BookKeeper("localhost:2181");
>       // 9 is a ledger id of an existing ledger
>       LedgerHandle lh = bk.openLedgerNoRecovery(9, 
> BookKeeper.DigestType.CRC32, "passwd".getBytes());
>       Enumeration<LedgerEntry> entries = lh.readEntries(0, 0);
>       lh.close();
>       bk.close();
>     } catch (Exception e) {
>       e.printStackTrace();
>     }
>   }
> }
> {code}
> Thread dump of this program shows that non-daemon thread 
> "ZkLedgerManagerScheduler-0"  is alive, after bk.close() is called. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to