vert-x3 / vertx-redis-client

Redis client for Vert.x
http://vertx.io
Apache License 2.0
128 stars 116 forks source link

[4.x] fix Redis connection sharing #424

Closed Ladicek closed 9 months ago

Ladicek commented 9 months ago

When a single RedisConnection is shared among multiple contexts (e.g. verticles), pipelining doesn't work correctly, because there is no coordination for concurrent access. This commit fixes that by making sure that all requests are performed from the same context on which the NetSocket was created. If the current context is different from the NetSocket context, the request is emitted on the correct context, which means no concurrent access, all requests are serialized.

Backport of #421 to 4.x