Sentinel
Sentinel copied to clipboard
【Enhancement】优化主流程lookProcessChain方法 issue #3513
Describe what this PR does / why we need it
issue #3513 (详细信息都在issue里)
Does this pull request fix one issue?
issue #3513
Describe how you did it
Describe how to verify it
实现逻辑参照Collections.synchronizedMap()
Special notes for reviews
后续思考:
当资源数限制(如 6000)放开后,或者可以允许超一点点去追求极致的性能的话,代码还可以进行如下优化: chainMap使用ConcurrentHashMap,不需要显示进行加锁,直接采用ConcurrentHashMap#computeIfAbsent方法,这样锁的粒度更小,性能更好。