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

Matteo Merli commented on BOOKKEEPER-220:
-----------------------------------------

I've addressed the issues pointed out by Ivan and incorporated its changes for 
the asyncOpen() method.
Updated on github: https://github.com/merlimat/managed-ledger/commits/master

Changelog : 
 * Improved code coverage
 * Updated Position javadoc to not mention ledgerId/entryId
 * Splitted complete/failed methods in async callbacks
 * Fixed problems reported by FindBugs
 * Marked public interfaces with @Beta
 * Extracting interface for Position
 * Removed (non-Javadoc) automatically inserted comments
 * Removed protected from package-private items
 * Removed executor for opening managed ledger
 * Fixed deadlock caused by updated the list of ledgers while it was already 
being updated asynchronously.

Few notes : 

 bq. What happens if one reader marks delete on a position, which another 
reader on the same ledger hasn't read yet?

A ledger is only deleted from BK when all the attached readers in the ML have 
consumed/markdeleted all the entries contained in that specific ledger.

Position class: I've changed that to an (emptpy) interface to hide 
ledgerId/entryId. Sijie, this won't exactly address your issue, because the 
current implementation of ML assumes a specific type of position (PositionImpl)

Protobuf: it would make sense to use protobuf for ML once all BK switches to 
it. For now I just thought the metadata required it's pretty simple and writing 
simple text content makes debugging easier.
                
> Managed Ledger proposal
> -----------------------
>
>                 Key: BOOKKEEPER-220
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-220
>             Project: Bookkeeper
>          Issue Type: New Feature
>          Components: bookkeeper-client
>            Reporter: Matteo Merli
>            Assignee: Matteo Merli
>             Fix For: 4.2.0
>
>         Attachments: 0001-BOOKKEEPER-220-Managed-Ledger-proposal.patch, 
> 0001-BOOKKEEPER-220-Managed-Ledger-proposal.patch, 
> 0001-BOOKKEEPER-220-Managed-Ledger-proposal.patch
>
>
> The ManagedLedger design is based on our need to manage a set of ledgers, 
> with a single writer (at any point in time) and a set on consumers that read 
> entries from it. 
> The ManagedLedger also takes care of periodically closing ledgers to have a 
> "reasonable" sized sets of ledgers that can individually deleted when no more 
> needed.
> I've put on github the interface proposal (along with an early WIP 
> implementation)
> http://github.com/merlimat/managed-ledger

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to