massakam commented on a change in pull request #10790:
URL: https://github.com/apache/pulsar/pull/10790#discussion_r648518432



##########
File path: 
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
##########
@@ -285,6 +285,37 @@ public MarkDeleteEntry(PositionImpl newPosition, 
Map<String, Long> properties,
         return lastMarkDeleteEntry != null ? lastMarkDeleteEntry.properties : 
Collections.emptyMap();
     }
 
+    @Override
+    public boolean putProperty(String key, Long value) {
+        if (lastMarkDeleteEntry != null) {
+            MarkDeleteEntry currentLastMarkDeleteEntry = lastMarkDeleteEntry;
+            Map<String, Long> properties = 
currentLastMarkDeleteEntry.properties;
+            if (properties == null || properties.isEmpty()) {

Review comment:
       Fixed the method to update `lastMarkDeleteEntry` using 
`AtomicReferenceFieldUpdater`.




-- 
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]


Reply via email to