kvrocks icon indicating copy to clipboard operation
kvrocks copied to clipboard

Bug: RESP3 protocol not properly recognized when connecting to Kvrocks through Redis Sentinel

Open i18nsite opened this issue 3 weeks ago • 0 comments

English / 中文

Bug: RESP3 protocol not properly recognized when connecting to Kvrocks through Redis Sentinel

Environment

  • Kvrocks Version: apache/kvrocks:latest (Docker image)
  • Setup: 1 master + 2 slaves with Redis Sentinel
  • Client: Node.js Redis client with RESP3 enabled

Description

When connecting to Kvrocks through Redis Sentinel with RESP3 protocol enabled, the connection is established but RESP3 is not properly recognized. The actual protocol used falls back to RESP2.

Steps to Reproduce

  1. Set up Kvrocks with Sentinel (1 master + 2 slaves)
  2. Connect through Redis Sentinel using a Redis client with RESP3 protocol enabled
  3. Observe that despite requesting RESP3, RESP2 is used instead

Expected Behavior

When connecting to Kvrocks through Sentinel with RESP3 enabled, the RESP3 protocol should be properly recognized and used.

Actual Behavior

  • Connection succeeds when specifying RESP3
  • However, the actual protocol used is RESP2
  • No error or warning is given about RESP3 incompatibility

Comparison with Redis

The same test code works correctly with standard Redis:

  • Running ./test_redis.sh - RESP3 works as expected
  • Running ./test_kvrocks.sh - Falls back to RESP2

Test Repository

https://github.com/i18nsite/redis_test

Screenshot showing the issue:


Bug: 通过 Redis 哨兵连接 Kvrocks 时 RESP3 协议不能被正确识别

环境

  • Kvrocks 版本: apache/kvrocks:latest (Docker 镜像)
  • 配置: 一主两从 + Redis 哨兵
  • 客户端: Node.js Redis 客户端启用 RESP3

问题描述

当通过 Redis 哨兵连接 Kvrocks 并启用 RESP3 协议时,虽然连接成功,但 RESP3 不能被正确识别,实际使用的协议降级为 RESP2。

复现步骤

  1. 使用哨兵搭建 Kvrocks 集群(一主两从)
  2. 通过 Redis 哨兵使用启用 RESP3 协议的 Redis 客户端连接
  3. 观察到虽然请求使用 RESP3,但实际使用的是 RESP2

期望行为

通过哨兵连接 Kvrocks 时启用 RESP3,RESP3 协议应该被正确识别和使用。

实际行为

  • 指定 RESP3 时连接成功
  • 但实际使用的协议是 RESP2
  • 没有关于 RESP3 不兼容的错误或警告

与 Redis 的对比

相同的测试代码在标准 Redis 上正常工作:

  • 运行 ./test_redis.sh - RESP3 正常工作
  • 运行 ./test_kvrocks.sh - 降级为 RESP2

测试仓库

https://github.com/i18nsite/redis_test

问题截图:

i18nsite avatar Dec 02 '25 04:12 i18nsite