coderzc commented on code in PR #17164:
URL: https://github.com/apache/pulsar/pull/17164#discussion_r973108503
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java:
##########
@@ -324,24 +328,27 @@ public Map<String, String> getCursorProperties() {
return cursorProperties;
}
- @Override
- public CompletableFuture<Void> setCursorProperties(Map<String, String>
cursorProperties) {
+ private CompletableFuture<Void> computeCursorProperties(
+ final Function<Map<String, String>, Map<String, String>>
updateFunction) {
CompletableFuture<Void> updateCursorPropertiesResult = new
CompletableFuture<>();
- ledger.getStore().asyncGetCursorInfo(ledger.getName(), name, new
MetaStoreCallback<>() {
- @Override
- public void operationComplete(ManagedCursorInfo info, Stat stat) {
- ManagedCursorInfo copy = ManagedCursorInfo
- .newBuilder(info)
- .clearCursorProperties()
-
.addAllCursorProperties(buildStringPropertiesMap(cursorProperties))
- .build();
- ledger.getStore().asyncUpdateCursorInfo(ledger.getName(),
- name, copy, stat, new MetaStoreCallback<>() {
+
+ final Stat lastCursorLedgerStat =
ManagedCursorImpl.this.cursorLedgerStat;
Review Comment:
Yes.
--
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]