[
https://issues.apache.org/jira/browse/BOOKKEEPER-11?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053910#comment-13053910
]
Ivan Kelly commented on BOOKKEEPER-11:
--------------------------------------
Patch looks good. I have a few comments.
Im not sure asyncOpenLedgerUnsafe conveys what it actually does. To the user of
the api it may convey that it is unsafe to do this. I think something like
asyncOpenActiveLedger would be more descriptive.
There's a couple of variables, such as LedgerOpenOp#unsafe which should be
declared final. If they should never change they should be marked as such so
people don't try to change them in the future.
In the line:
+ lh.bk.bookieClient.readEntry(lh.metadata.currentEnsemble.get(i),
lh.ledgerId, -1, this, i);
-1 is a magic number. This should be defined as a MAX_ENTRY_ID or
UNKNOWN_ENTRY_ID constant somewhere.
In the readEntryComplete, it looks as if you return the maximum value you see
on any bookie. However, since this isn't a quorum, it could come from only one
machine which could subsequently crash (along with the writing client) before
the other bookies see it. Is this correct?
> Read from open ledger
> ---------------------
>
> Key: BOOKKEEPER-11
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-11
> Project: Bookkeeper
> Issue Type: New Feature
> Reporter: Flavio Junqueira
> Attachments: BOOKKEEPER-11.patch, zk-1001-design-doc.pdf,
> zk-1001-design-doc.pdf
>
>
> The BookKeeper client currently does not allow a client to read from an open
> ledger. That is, if the creator of a ledger is still writing to it (and the
> ledger is not closed), then an attempt to open the same ledger for reading
> will execute the code to recover the ledger, assuming that the ledger has not
> been correctly closed.
> It seems that there are applications that do require the ability to read from
> a ledger while it is being written to, and the main goal of this jira is to
> discuss possible implementations of this feature.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira