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

Ivan Kelly commented on BOOKKEEPER-347:
---------------------------------------

testLedgerCreationShouldFailWithReadonlyBookie is still flakey. This is due to 
the bookieWatcher in the bookie client not being updated immediately when the 
bookie transitions. It has to wait for the watcher to trigger, but by this 
time, createLedger may have already been called. This can be solved by 
modifying the test to the following 

{code}
    /**
     * Test ledger creation with readonly bookies
     */
    public void testLedgerCreationShouldFailWithReadonlyBookie() throws 
Exception {
        killBookie(1);
        baseConf.setReadOnlyModeEnabled(true);
        startNewBookie();

        bs.get(1).getBookie().transitionToReadOnlyMode();
        try {
            bkc.readBookiesBlocking();
            bkc.createLedger(2, 2, DigestType.CRC32, "".getBytes());
            fail("Must throw exception, as there is one readonly bookie");
        } catch (BKException e) {
            // Expected
        }
    }
{code}
I also rejigged the how you start the bookie. I don't like changing the conf of 
the bookie on the fly, as the result on the bookie side could be unpredictable. 
                
>  Provide mechanism to detect r-o bookie by the bookie clients
> -------------------------------------------------------------
>
>                 Key: BOOKKEEPER-347
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-347
>             Project: Bookkeeper
>          Issue Type: Sub-task
>          Components: bookkeeper-client
>    Affects Versions: 4.1.0
>            Reporter: Rakesh R
>            Assignee: Vinay
>             Fix For: 4.2.0
>
>         Attachments: BOOKKEEPER-347.patch, BOOKKEEPER-347.patch, 
> BOOKKEEPER-347.patch, BOOKKEEPER-347.patch
>
>
> This jira to discuss, how the bookie client knows about the bookie running in 
> r-o. This would be required by the client to choose writable bookies during 
> add entries. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to