Skip to content

Commit

Permalink
different bookie trigger gcOverreplicatedLedger randomly
Browse files Browse the repository at this point in the history
  • Loading branch information
fanjianye committed Apr 28, 2024
1 parent 01c9149 commit 22fdca5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ public ScanAndCompareGarbageCollector(LedgerManager ledgerManager, CompactableLe
this.selfBookieAddress = BookieImpl.getBookieId(conf);

this.gcOverReplicatedLedgerIntervalMillis = conf.getGcOverreplicatedLedgerWaitTimeMillis();
this.lastOverReplicatedLedgerGcTimeMillis = System.currentTimeMillis();
if (gcOverReplicatedLedgerIntervalMillis > 0) {
this.enableGcOverReplicatedLedger = true;
this.lastOverReplicatedLedgerGcTimeMillis = System.currentTimeMillis()
+ (long) (gcOverReplicatedLedgerIntervalMillis * Math.random());
}
this.maxConcurrentRequests = conf.getGcOverreplicatedLedgerMaxConcurrentRequests();
LOG.info("Over Replicated Ledger Deletion : enabled={}, interval={}, maxConcurrentRequests={}",
Expand Down

0 comments on commit 22fdca5

Please sign in to comment.