Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Detected server version is non-deterministic on Valkey since 3.4.0

Cerrado
#3,278 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
csharp, docker
Área
databases

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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);
}
Lenguaje dominante
C#
Estrellas
6.2k
Forks
1.6k
Merge medio
2 d 3 h
PR fusionados (30 d)
28

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de StackExchange/StackExchange.Redis

Todos los issues de StackExchange/StackExchange.Redis

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.