[
https://issues.apache.org/jira/browse/BOOKKEEPER-623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13681005#comment-13681005
]
Vinay commented on BOOKKEEPER-623:
----------------------------------
bq. the extra segment doesn't affect the semantic of a closed ledger. so it is
a auto-recovery issue not an error handling issue here.
Agree.
bq. second, the segment is added when changing ensemble before closing.
Here change of ensemble is happening after the ledger is closed. because
Fenced/Unauthorized callback comes first and makes the ledger closed. Then
BookieFailure callback comes and try to add the ensemble.
bq. third, I don't think you need to add metadata.isClosed checking, since any
zookeeper update is conditional and LedgerMetadata#resolveConflict already
check if the metadata is Closed or not.
Resolve conflict might have come while handling the callbacks for
LegerFenced/Unauthorized exceptions. But it will be resolved and metadata will
be updated at that time. Later when handling bookie failures in
{{LedgerHandle#handleBookieFailure(..)}} no conflicts will come, because all
the later updates (ensemble change) will happen on the same instance of
metadata which is already resolved the conflict, so it will have the latest
zookeeper version and state. So obviously no check will happen before adding
extra ensemble.
> Metadata is having extra Segment which is causing AutoRecovery to fail
> ----------------------------------------------------------------------
>
> Key: BOOKKEEPER-623
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-623
> Project: Bookkeeper
> Issue Type: Bug
> Components: bookkeeper-server
> Affects Versions: 4.2.1, 4.3.0
> Reporter: Vinay
> Assignee: Vinay
> Fix For: 4.3.0
>
> Attachments: BOOKKEEPER-623.patch, BOOKKEEPER-623.patch
>
>
> With the almost same testcase mentioned in the BOOKKEEPER-584, Ledger
> metadata is getting added with extra segment during failure handling of
> bookies along with fencing.
> Only difference in the testcase is .
> 1. Before bookie failures some entries were already written
> 2. And after bookies failed ( First bookie will throw
> LedgerFenced/Unauthorized exception, and second bookie is slow/dead bookie ),
> Number of entries written asynchrounously is n*ensembleSize+1
> Note that, Unauthorized/FencedException callback comes first, then other
> bookie failure callback comes.
> I will attach a TestCase along with patch for this shortly. Testcase is
> modified version of attached testcase in BOOKKEEPER-584
--
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