Enhancement: Graceful Handling of Redis LOADING State in Rueidis #656
Labels
enhancement
New feature or request
feature
good first issue
Good for newcomers
help wanted
Extra attention is needed
When connecting to a Redis server that is in the process of loading its dataset into memory (e.g., during startup or after a restart), Redis responds to client commands with a LOADING Redis is loading the dataset in memory error. Currently, Rueidis does not handle this state internally, which requires applications to implement custom logic to manage this scenario.
Proposal:
Enhance Rueidis to automatically detect and handle the LOADING state returned by Redis. This could involve:
Use Case:
In production environments with large datasets, Redis may take significant time to load data from disk into memory. During this period, clients attempting to send commands will receive a LOADING error. Handling this scenario within Rueidis would:
Current Workaround:
Here's an example of how this issue is currently handled in application code:
Redis Logs During Loading:
Possible benefits:
The text was updated successfully, but these errors were encountered: