Senrian commented on PR #10235: URL: https://github.com/apache/rocketmq/pull/10235#issuecomment-4190592043
Hi @Kris20030907, thank you for the review. Could you clarify which specific change you are concerned about? The `computeIfAbsent` pattern used here is a standard ConcurrentHashMap atomic operation and is actually the recommended approach for this type of race condition (check-then-act on a map entry). It avoids the performance overhead of synchronized blocks while ensuring thread-safety. Would you prefer a different approach, such as using `synchronized` blocks or accepting the race condition? -- 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]
