[
https://issues.apache.org/jira/browse/BOOKKEEPER-736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14105737#comment-14105737
]
Rakesh R commented on BOOKKEEPER-736:
-------------------------------------
bq. rereplicate op stats already has a counter for the re-replication
operations.
ok, its counter for re-replication attempts. Actually
ReplicationWorker#rereplicate() is a blocking call and will not return until a
ledger is available for rereplication. It will not give the latency of the
replication attempt if we keep the logic over the #rereplicate() call. Can we
think of moving the latency computation inside #rereplicate() call like below:
{code}
private void rereplicate() {
long ledgerIdToReplicate = underreplicationManager
.getLedgerToRereplicate();
stopwatch.reset().start();
//....
//....replication logic
//....
long latencyMillis = stopwatch.stop().elapsedMillis();
underreplicationManager.markLedgerReplicated(ledgerIdToReplicate);
//...
}
{code}
{quote}bookie process starts up, it marks 3 ledgers as underreplicated, the
counter is 3.
bookie failed and restarted, the counter was reset to 0. those 3 ledgers are
marked as replicated after re-replicated. so the counter becomes -3. what does
-3 mean? it means nothing.
{quote}
Thank you for your patience. Yeah, "UrLedgers" could not be able to manage as
counter. This has to be queried to the ZooKeeper for accuracy. I have one last
doubt, is there any way to represent a flag "UrLedgersExists" true/false in
StatsLogger? If yes, one idea to implement this is - ReplicationWorker can
maintain this flag. He has the knowledge of under replicated ledgers in bk
cluster. Using this information he can set the flag to true or false during his
re-replication attempts.
If you feel this is not meaningful, I agree to leave this part now and move
ahead with other areas rather than spending time on this:)
> Stats for AutoRecovery
> ----------------------
>
> Key: BOOKKEEPER-736
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-736
> Project: Bookkeeper
> Issue Type: New Feature
> Components: bookkeeper-auto-recovery
> Reporter: Rakesh R
> Assignee: Sijie Guo
> Fix For: 4.3.0
>
> Attachments: BOOKKEEPER-736.patch, BOOKKEEPER-736.v2.patch,
> Prototype-JMX-beans-for-standalone-autorecovery-process.png
>
>
> Idea of this JIRA is to provide jmx interfaces to get the statistics of the
> auto recovery activities.
--
This message was sent by Atlassian JIRA
(v6.2#6252)