BewareMyPower commented on PR #26163: URL: https://github.com/apache/pulsar/pull/26163#issuecomment-4954373423
Hi, @Denovo1998 @void-ptr974 I've addressed your comments in latest commit with a few improvements, PTAL. 1. Before that, the tracer requires users to explicitly call `trace` before calling `latencyInMillis()` or `latencyString()`, which is not friendly, so the latest design adopts an efficient CAS call to ensure the last timestamp could be computed lazily with "done" as the stage description. 2. For thread safety issue, I think it's caused by a bad design of the topic loading timeout mechanism. But I'd like to avoid touching that issue in this PR, so I will simply change `TopicLoadingContext`'s `timepoints` to a thread safe queue. If the timeout mechanism can be removed in future, it can be changed back to a not thread safe queue like `LinkedList`. -- 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]
