Renkai commented on a change in pull request #9096:
URL: https://github.com/apache/pulsar/pull/9096#discussion_r560170171
##########
File path:
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedger.java
##########
@@ -595,4 +594,10 @@ void asyncSetProperties(Map<String, String> properties,
final AsyncCallbacks.Upd
* Get the ManagedLedgerInterceptor for ManagedLedger.
* */
ManagedLedgerInterceptor getManagedLedgerInterceptor();
+
+ /**
+ * Get basic ledger summary after the ledger is closed.
+ * will got exception if corresponding ledger was not closed when the
method called.
+ */
+ CompletableFuture<LedgerInfo> getClosedLedgerInfo(long ledgerId);
Review comment:
> Is it better to named getLedgerInfo? and does not distinguish whether
it is closed. The closed state should contains in the LedgerInfo(Now I think we
use the entries=0 to determine the ledger close or not)
My design is refuse to return an unclosed result to prevent caller to get an
incomplete result in accident.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]