lhotari commented on code in PR #25658:
URL: https://github.com/apache/pulsar/pull/25658#discussion_r3178499222


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/scalable/ScalableTopicController.java:
##########
@@ -285,8 +285,13 @@ public CompletableFuture<SegmentLayout> getLayout() {
     public CompletableFuture<SegmentLayout> splitSegment(long segmentId) {
         checkLeader();
 
+        // Single timestamp shared by the local preview and the CAS-retried 
metadata update,
+        // so the children's createdAtMs and the parent's sealedAtMs always 
agree even if the
+        // CAS retries due to concurrent writers.
+        final long nowMs = System.currentTimeMillis();

Review Comment:
   In some of the existing code locations, PulsarService's `java.time.Clock 
clock` field is used for timestamps, however it's not consistently applied in 
the code base. Would it be useful to use `java.time.Clock` for timestamps?



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

Reply via email to