[
https://issues.apache.org/jira/browse/BOOKKEEPER-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13747418#comment-13747418
]
Ivan Kelly commented on BOOKKEEPER-580:
---------------------------------------
I've changed the patch to complete with OK if the metadata is already closed.
Its better to be backwards compatible in this case, and consistent between the
async and sync versions. I did have to update one test, TestFencing, to not
expect an exception any more, when another client has closed the ledger. This
is fine though, as the LAC will be the same in the opening client and the
closing client. No assumption has changed for the user. They will be notified
of the fencing by the failure of the #addEntry call. If there is an
incompatibility in the metadata (client has a lower LAC to what was closed
with), LedgerMetadata#isConflictWith will catch it on the reread.
> improve close logic
> -------------------
>
> Key: BOOKKEEPER-580
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-580
> Project: Bookkeeper
> Issue Type: Bug
> Components: bookkeeper-client
> Reporter: Sijie Guo
> Assignee: Ivan Kelly
> Fix For: 4.2.2, 4.3.0
>
> Attachments: 0001-BOOKKEEPER-580-improve-close-logic.patch,
> 0001-BOOKKEEPER-580-improve-close-logic.patch, BOOKKEEPER-580.diff,
> BOOKKEEPER-580.diff
>
>
> currently, bookkeeper client still write ledger metadata to metadata storage
> even the metadata is already closed or undergoing closing. which would cause
> lots of bad version metadata update encountering unrecoverable errors in
> ledger handle. e.g. NotEnoughtBookiesException.
--
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