i18nsite opened a new pull request, #3286:
URL: https://github.com/apache/kvrocks/pull/3286

   fix https://github.com/apache/kvrocks/issues/3285
   [English](#en) / [中文](#cn)
   
   <a id="en"></a>
   
   ## Root Cause Analysis
   
   The issue occurs because Kvrocks reports its Redis version as `4.0.0` 
(defined in `src/server/server.h:61`), while RESP3 protocol was introduced in 
Redis 6.0. 
   
   **Most Redis client libraries perform version checking before attempting to 
use RESP3.** When clients see a server version below 6.0, they skip the `HELLO 
3` command entirely and default to RESP2, even if the server actually supports 
RESP3.
   
   ### How Redis Clients Check Version
   
   1. Client connects to Redis/Kvrocks
   2. Client checks server version (via `INFO` or `HELLO` response)
   3. **If version < 6.0**: Client assumes RESP3 is not supported and uses RESP2
   4. **If version >= 6.0**: Client sends `HELLO 3` to negotiate RESP3
   
   ### Why This Affects Sentinel Connections
   
   When connecting through Redis Sentinel:
   - Sentinel provides the master address to the client
   - Client connects to the master and checks its version
   - If Kvrocks reports version `4.0.0`, the client library won't attempt RESP3
   - This happens regardless of the `resp3-enabled` configuration
   
   ## Solution
   
   **Update `REDIS_VERSION` from `"4.0.0"` to `"7.0.0"`** in 
[src/server/server.h](cci:7://file:///Users/z/git/kvrocks/kvrocks/src/server/server.h:0:0-0:0).
   
   ### Why 7.0.0 Instead of 6.0.0?
   
   While RESP3 was introduced in Redis 6.0, **Redis 7.0 is the first version 
with full, production-ready RESP3 support**. Some client libraries may have 
additional checks or optimizations specifically for Redis 7.0+. Using version 
`7.0.0` ensures maximum compatibility with all modern Redis clients.
   
   ### Code Change Required
   
   ```cpp
   // src/server/server.h:61
   -constexpr const char *REDIS_VERSION = "4.0.0";
   +constexpr const char *REDIS_VERSION = "7.0.0";


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to