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

Flavio Junqueira commented on BOOKKEEPER-11:
--------------------------------------------

Thanks for checking, Ivan.

{quote}
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. 
{quote}

The problem is that the writer of the ledger might have failed at the time the 
application invokes "asyncOpenActiveLedger". Consequently, the ledger might not 
really be active anymore, and the application must know of that possibility. I 
don't mind changing the name, but I don't feel that OpenActive makes it better.

{quote}
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. 
{quote} 

Ok. Listing the variables will help.

{quote}
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? 
{quote}

Due to concurrent writes and striping, we are not guaranteed to have a quorum 
returning the same last hint. But, given that we compute a digest and verify 
upon reading, whatever value we return should be correct. In fact, it is ok to 
return the first value we receive. I've made it wait for a quorum because by 
assumption there must be at least one quorum available, ans we have a chance of 
returning a larger value (assuming there is one) if we read from more bookies . 
Waiting for more than a quorum does not guarantee that the operation will 
return.




> 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

        

Reply via email to