Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Detected server version is non-deterministic on Valkey since 3.4.0

クローズ
#3,278 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp, docker
領域
databases

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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);
}
主要言語
C#
スター
6.2k
フォーク
1.6k
平均マージ
2日 3時間
マージ済み PR(30日)
28

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

StackExchange/StackExchange.Redis のほかの issue

StackExchange/StackExchange.Redis の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。