Nordix / hiredis-cluster

C client library for Valkey/Redis Cluster. This project is used and sponsored by Ericsson. It is a fork of the now unmaintained hiredis-vip.
BSD 3-Clause "New" or "Revised" License
86 stars 42 forks source link

Update slotmap when slot is not served by any node #192

Closed bjosv closed 11 months ago

bjosv commented 11 months ago

The sync-API will now update the slotmap before attempting to send a command when the slot is not served.

The async-API will initate the slotmap update in parallell so that the next command might have an updated slotmap.

This also fix an additional issue by using the correct function name for redisClusterUpdateSlotmap(). The former name cluster_update_route() is not defined when HIRCLUSTER_NO_OLD_NAMES is defined, which would break the build.

Fixes #191

bjosv commented 11 months ago

I reverted the callback handling for AUTH commands, to be added via separate PR. There are other authentication related changes that can be discussed in that PR.

Also removed the use of the eventloop in the testcases that didn't need any events for its testing.