Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Detected server version is non-deterministic on Valkey since 3.4.0

Đã đóng
#3,278 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp, docker
Lĩnh vực
databases

Hướng nghiên cứu

The version comes from ServerEndPoint.Version, which is set by whichever handshake reply (INFO redis_version or HELLO version) is processed last; start by reading the code that handles those two replies during connection setup. Run the repro against valkey/valkey:9.1.2 in Docker to see the version change between connections. Done when the detected version is the same on every connection and LockReleaseAsync no longer sends DELEX to Valkey 9.1.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Description

Since 3.4.0, ServerEndPoint.Version depends on which handshake reply is processed last: INFO (redis_version) or HELLO (version).
On Redis both values are identical, so nothing shows.
On Valkey they differ (redis_version:7.2.4 in INFO, version: 9.1.2 in HELLO).
So the detected version changes from one connection to another, and commands gated on Redis versions get used on a server that does not support them.

For exemple, one consequence: LockRelease sometimes sends DELEX, which Valkey 9.1 does not know, and the lock is not released.

Environment
  • StackExchange.Redis 3.4.5
  • Valkey 9.1
  • .NET 10
Repro
docker run --rm -d -p 6379:6379 valkey/valkey:9.1.2
#:package [email protected]

using StackExchange.Redis;

for (int i = 1; i <= 50; i++)
{
    using ConnectionMultiplexer muxer = await ConnectionMultiplexer.ConnectAsync("localhost:6379");

    IDatabase db = muxer.GetDatabase();
    string key = $"lock:{i}";

    await db.LockTakeAsync(key, "token", TimeSpan.FromSeconds(30));

    await Task.Delay(100);

    Console.Write($"#{i} server.Version={muxer.GetServers()[0].Version}: ");

    try
    {
        Console.WriteLine($"released={await db.LockReleaseAsync(key, "token")}");
    }
    catch (RedisServerException ex)
    {
        Console.WriteLine(ex.Message);
    }

    await db.KeyDeleteAsync(key);
}
Ngôn ngữ chính
C#
Star
6.2k
Fork
1.6k
Merge trung bình
2 ngày 3 giờ
Pull request đã merge (30 ngày)
28

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của StackExchange/StackExchange.Redis

Tất cả issue của StackExchange/StackExchange.Redis

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.