eolivelli commented on code in PR #17212:
URL: https://github.com/apache/pulsar/pull/17212#discussion_r953715568
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -1503,7 +1503,7 @@ public void operationComplete(Void v, Stat stat) {
currentLedgerEntries = 0;
currentLedgerSize = 0;
metadataMutex.unlock();
- updateLedgersIdsComplete(stat);
+ updateLedgersIdsComplete();
Review Comment:
so there is no need to change the title
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -1503,7 +1503,7 @@ public void operationComplete(Void v, Stat stat) {
currentLedgerEntries = 0;
currentLedgerSize = 0;
metadataMutex.unlock();
- updateLedgersIdsComplete(stat);
+ updateLedgersIdsComplete();
Review Comment:
after re-reading the code I have verified that the behaviour did not change.
you only removed a useless parameter and split the method
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -1569,14 +1569,7 @@ private void
updateLedgersListAfterRollover(MetaStoreCallback<Void> callback, Le
store.asyncUpdateLedgerIds(name, mlInfo, ledgersStat, callback);
}
- public synchronized void updateLedgersIdsComplete(Stat stat) {
- STATE_UPDATER.set(this, State.LedgerOpened);
- updateLastLedgerCreatedTimeAndScheduleRolloverTask();
-
- if (log.isDebugEnabled()) {
- log.debug("[{}] Resending {} pending messages", name,
pendingAddEntries.size());
- }
-
+ public void createNewOpAddEntryForNewLedger() {
Review Comment:
can we add "VisibleForTesting" ?
this method is not meant to be called by other classes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]