szetszwo commented on PR #6303: URL: https://github.com/apache/ozone/pull/6303#issuecomment-1977073350
> Moreover Node2PipelineMap contains ConcurrentHashMap<UUID, Set<PipelineID>> and two synchronized methods ... Since there are multiple nodes, removing `synchronized` can lead to an inconsistent state. Suppose Pipeline `p` has datanodes [A, B, C] and we have the following two calls: 1. addPipeline(p) 2. removePipeline(p) With `synchronized`, all datanodes A, B, C will be added and then removed. Without `synchronized`, it may - add A, B - remove A, B, C - add C Then, C is not removed. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
