You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe
In the production environment, when the number of access requests sent by Lettuce as the Redis client reaches tens of thousands of qps, the latency of many access requests is long.
Describe the solution you'd like
When the getWriteConnection command is used to obtain a write connection in the PooledClusterConnectionProvider class, the system locks the connection and then checks whether the value of weiters[slot] is empty. When most elements in writers are assigned values, the performance is affected.
Describe alternatives you've considered
The code in getWriteConnection is changed to double-check lock. The system checks whether weiters[slot] is empty. If yes, the system locks it. Then, the system checks whether weiters[slot] is empty. If yes, the system checks whether weiters[slot] is empty. initializes weiters[slot]. Otherwise, returns weiters[slot].