[
https://issues.apache.org/jira/browse/BOOKKEEPER-299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400393#comment-13400393
]
Uma Maheswara Rao G commented on BOOKKEEPER-299:
------------------------------------------------
{quote}
Another thing which would be nice to change here, is that currently the
recovery code will try to recover all entries in parallel. I don't like this. I
think it would be better to do it in series, so that we don't overload the
server with a lot of read requests at once.
{quote}
I have worked for some time on this part.
Currently BookKeeperAdmin is opening the ledger first. On the call back of
openLedger only, it is chainnig the call backs till it replicates the entries.
To make the entries sequential, we have to wait, till the first entry complete,
to go for next entry to read/write.
Here the problem I see is, openledger itself holds the executor thread because,
callback not completely released as ledgerRecovery initiated on callback to
openledger.
So, for the first entry, even though we recive the Message from BookieServer to
PerChannelBookieClient#messageReceived, it is not able to start the submitted
thread for handling the reponse for first entry.
{code}
executor.chooseThread(ledgerId).submit(new SafeRunnable() {
@Override
public void safeRun() {
{code}
We may have to make the open ledger call independant and start the ledger
recovery once we get the LedgerHandle.
I think this work can be done in separate JIRA as we may have to refactor more
at this lines to make it sequential.
As part of this JIRA, I will just move some part of the code to
LedgerFragmentReplicator from admin and provide the Replicate Fragment API for
Replication worker to use. Does this sound fine to you Ivan?
> Provide LedgerFragmentReplicator which should replicate the fragments found
> from LedgerChecker
> ----------------------------------------------------------------------------------------------
>
> Key: BOOKKEEPER-299
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-299
> Project: Bookkeeper
> Issue Type: Sub-task
> Components: bookkeeper-client, bookkeeper-server
> Affects Versions: 4.2.0
> Reporter: Uma Maheswara Rao G
> Assignee: Uma Maheswara Rao G
> Attachments: BOOKKEEPER-299.patch
>
>
> Replication worker requires LedgerFragmentReplicator for replicating the
> actula fragments found from Ledger checker.
> Most of the fragment replication code available in BookKeeperAdmin. We can
> refactor it to LedgerFragmentReplicator and use it.
--
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