apache / rocketmq-clients

RocketMQ Clients - Collection of Client Bindings for Apache RocketMQ
https://rocketmq.apache.org/
Apache License 2.0
330 stars 216 forks source link

[Java] optimize rpcClientTable lock #860

Open crazywen opened 3 weeks ago

crazywen commented 3 weeks ago
  1. drop rpcClientTableLock, use ConcurrentHashMap instead HashMap
  2. use endpoints synchronized ignore concurrent put
  3. idleClient split to shutdown

Which Issue(s) This PR Fixes

Fixes #857

Brief Description

Minimize lock control to avoid read and write blocking caused by write locks, and handle independent shutdown idle client

How Did You Test This Change?

use ClientManagerImplTest