[
https://issues.apache.org/jira/browse/BOOKKEEPER-661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13873664#comment-13873664
]
Rakesh R commented on BOOKKEEPER-661:
-------------------------------------
Thanks Sijie for the patch.
Adding few comments, please see:
# 'regPath' is missing in logging, please pass args to it.
{code}
LOG.error("ZK exception checking and wait ephemeral znode {} expired : ", ke);
LOG.error("Interrupted checking and wait ephemeral znode {} expired : ", ie);
{code}
# Please add (timeout=60000) for the test case.
{code}
+ public void testBookieShouldTurnWritableFromReadOnly() throws Exception {
{code}
Also, since you are touching it would be great if you can include timeout for
other testcases in ReadOnlyBookieTest class.
Somehow we have missed this class when doing the BOOKKEEPER-523 imprv activity.
# It is good practise to have fail statement in tests when we are expecting an
exception. Please use like the below one.
{code}
+ try {
+ ledger.addEntry("data".getBytes());
Assert.fail("Should throw exception as not enough bookies to write
entry!");
+ } catch (BKException.BKNotEnoughBookiesException e) {
+ // Expected
+ }
+ try {
+ bkc.createLedger(2, 2, DigestType.MAC, "".getBytes());
Assert.fail("Should throw exception as not enough bookies to
create ledger!");
+ } catch (BKException bke) {
+ // Expected.
+ }
{code}
> Turn readonly back to writable if spaces are reclaimed.
> -------------------------------------------------------
>
> Key: BOOKKEEPER-661
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-661
> Project: Bookkeeper
> Issue Type: Improvement
> Components: bookkeeper-server
> Reporter: Sijie Guo
> Assignee: Sijie Guo
> Fix For: 4.3.0
>
> Attachments: BOOKKEEPER-661.diff, BOOKKEEPER-661.diff,
> BOOKKEEPER-661.diff, BOOKKEEPER-661_662.diff
>
>
> should be able to turn a bookie from readonly back to writable if the spaces
> are reclaimed.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)