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

Correct issues in the async low-level API #177

Closed bjosv closed 1 year ago

bjosv commented 1 year ago

The behaviour in the regular async API and in the low-level API ..ToNode() differs due to that separate internal callback functions are used. By merging these functions we get a coherent behaviour and fix following issues:

This PR includes a new testcase to cover the above issues, see dbsize-to-all-nodes-during-scaledown-test

Additionally, this PR also adds a testrun of the existing low-level API testcase dbsize-to-all-nodes-test using the async API, previously it was only run for the blocking API, and a merge of the special-case testbinary clusterclient_all_nodes (for low-level API testing) into the more generic testbinary clusterclient. This is enabled by a new action command !all that is added to clusterclient and clusterclient_async_sequence which enables tests to send commands to all known nodes via the ..ToNode() API.

Fixes #176

bjosv commented 1 year ago

I guess ToNode follows redirects and updates slotmap on MOVED too. Can be worth mentioning.

Updated the README to mention resends/redirects both for the sync-API and aync-API now.

Then I couldn't find the reason why ASAN with gcc-10.5 wont work in CI for any testing anymore, results in:

    ==4591==Sanitizer CHECK failed: ../../../../src/libsanitizer/lsan/lsan_interceptors.cpp:53 ((!lsan_init_is_running)) != (0) (0, 0)

gcc-10.5 is the latest gcc-10 which is provided by APT so it was upgraded "behind the scenes".

I lifted our CI to use gcc-11 instead of going back to gcc-10.3 which worked fine before. gcc-11 seems to be the last supported gcc anyway according to https://gcc.gnu.org/