dragonflydb / dragonfly

A modern replacement for Redis and Memcached
https://www.dragonflydb.io/
Other
25.96k stars 954 forks source link

fix: Use `MOVED` error type for moved replies #4125

Closed chakaz closed 1 week ago

chakaz commented 1 week ago

The problem:

When in cluster mode, MOVED replies (which are arguably not even errors) are aggregated per slot-id + remote host, and displayed in # Errorstats as such. For example, in a server that does not own 8k slots, we will aggregate 8k different errors, and their counts (in memory).

This slows down all INFO replies, takes a lot of memory, and also makes INFO replies very long.

The fix:

Use type MOVED for moved replies, making them all the same under # Errorstats

Fixes #4118