Add Support for Hash Field Expiration Commands (HEXPIRE, HEXPIREAT, HGETEX, HPERSIST)
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
- 45/100
Línea de trabajo
Comienza con las especificaciones de HEXPIRE, HEXPIREAT, HGETEX y HPERSIST enlazadas en el issue; después, localiza los puntos de entrada existentes de los comandos de hash en Kvrocks y el comportamiento relacionado con la expiración. Se considera terminado cuando los cuatro comandos implementen el comportamiento compatible con Valkey documentado y tengan cobertura para establecer, leer y eliminar la expiración de campos de hash.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
English / 中文
Add Support for Hash Field Expiration Commands (HEXPIRE, HEXPIREAT, HGETEX, HPERSIST)
Introduction
Valkey 9.0 has introduced new commands for setting expiration times on individual hash fields: HEXPIRE, HEXPIREAT, HGETEX, and HPERSIST. These commands allow developers to set expiration times for individual fields independently, enabling finer-grained and more flexible cache control. This enhancement is particularly beneficial for user sessions, temporary data, or cache segmentation scenarios.
According to the Valkey 9.0 release announcement (https://www.linuxmi.com/valkey-9-0.html), these new commands break previous limitations and provide more granular control over hash field expiration.
Proposal
I propose that Kvrocks should also implement these new commands to enhance its compatibility with Redis/Valkey and provide users with more advanced caching capabilities:
-
HEXPIRE- Set expiration time for a hash field with a TTL in seconds
https://redis.io/docs/latest/commands/hexpire/ -
HEXPIREAT- Set expiration time for a hash field with an absolute Unix timestamp
https://redis.io/docs/latest/commands/hexpireat/ -
HGETEX- Get the value of a hash field and set its expiration time
https://redis.io/docs/latest/commands/hexpireat/ -
HPERSIST- Remove expiration time from a hash field## About Valkey
https://redis.io/docs/latest/commands/hpersist/
Valkey is a drop-in replacement for Redis that maintains full compatibility while being developed under a truly open-source license (BSD). Major cloud providers including Alibaba, Huawei, Tencent, Amazon, Google, and Ericsson have joined the Valkey initiative.
As noted in industry reports (https://mp.weixin.qq.com/s/6JY3Sl2pLBCLT6Ry1lPdHA), Valkey currently has 6 core maintainers from leading technology companies, ensuring robust community support and ongoing development.
Furthermore, Arch Linux has officially deprecated Redis in favor of Valkey (https://mp.weixin.qq.com/s/yOBjPk1Gqsp2ljQB-3T0nA), highlighting the growing adoption of Valkey as the preferred Redis alternative.
The primary reason for this shift is that Redis changed its license from BSD-3-Clause to RSALv2 and SSPLv1 on March 20, 2024, which many consider to no longer qualify as open-source software. Valkey, as a fork of Redis under the BSD license, represents a community-driven alternative promoted by major companies including Amazon, Google, and Oracle.
Implementing these new hash expiration commands would position Kvrocks as a more complete Redis/Valkey-compatible solution, aligning with the direction of the broader open-source community.
添加对哈希字段过期命令的支持 (HEXPIRE、HEXPIREAT、HGETEX、HPERSIST)
简介
Valkey 9.0 引入了新的命令来为单个哈希字段设置过期时间:HEXPIRE、HEXPIREAT、HGETEX 和 HPERSIST。这些命令允许开发人员独立地为各个字段设置过期时间,从而实现更精细和灵活的缓存控制。对于用户会话、临时数据或缓存细分等场景来说,这一增强功能尤其有益。
根据 Valkey 9.0 发布公告 (https://www.linuxmi.com/valkey-9-0.html),这些新命令打破了之前的限制,提供了对哈希字段过期更精细的控制。
建议
建议 Kvrocks 也实现这些新命令,以增强其与 Redis/Valkey 的兼容性,并为用户提供更高级的缓存功能:
HEXPIRE- 使用以秒为单位的 TTL 为哈希字段设置过期时间HEXPIREAT- 使用绝对 Unix 时间戳为哈希字段设置过期时间HGETEX- 获取哈希字段的值并设置其过期时间HPERSIST- 移除哈希字段的过期时间
关于 Valkey
Valkey 是 Redis 的直接替代品,在保持完全兼容的同时采用真正的开源许可(BSD)进行开发。包括阿里、华为、腾讯、亚马逊、谷歌和爱立信在内的主要云提供商已加入 Valkey 倡议。
正如行业报告中所述 (https://mp.weixin.qq.com/s/6JY3Sl2pLBCLT6Ry1lPdHA),Valkey 目前有 6 位来自领先技术公司的核心维护者,确保了强大的社区支持和持续的开发。
此外,Arch Linux 已正式弃用 Redis 转而支持 Valkey (https://mp.weixin.qq.com/s/yOBjPk1Gqsp2ljQB-3T0nA),这突显了 Valkey 作为首选 Redis 替代品日益增长的采用率。
这种转变的主要原因是 Redis 在 2024 年 3 月 20 日将其许可证从 BSD-3-Clause 更改为 RSALv2 和 SSPLv1,许多人认为这不再符合开源软件的资格。Valkey 作为 BSD 许可证下的 Redis 分支,代表了由亚马逊、谷歌和甲骨文等大公司推动的社区驱动替代方案。
实现这些新的哈希过期命令将使 Kvrocks 成为更完整的 Redis/Valkey 兼容解决方案,与更广泛的开源社区发展方向保持一致。
- Lenguaje dominante
- C++
- Estrellas
- 4.5k
- Forks
- 689
- Merge medio
- 1 d 22 h
- PR fusionados (30 d)
- 37
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/kvrocks
-
HSETEXPIRE with an overflowing TTL returns OK and deletes the whole hashPosiblemente ocupada @anubhavgupta121 la tomó hace 20 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
`JSON.STRAPPEND` with non JSON value crashes the serverPosiblemente ocupada @ggyuchive la tomó hoy. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
A blocked client that is woken but loses the element to another client is never woken againPosiblemente ocupada @ggyuchive la tomó hace 1 día. Abiertobug
Dificultad 4/5 1-2 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
-
SSCAN, HSCAN, ZSCAN don't finish when an empty-string member is returned at the end of a pagePosiblemente ocupada @ggyuchive la tomó hace 3 días. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
`GEOSEARCH` / `GEORADIUS` with a negative radius hangsPosiblemente ocupada @ggyuchive la tomó hace 9 días. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
Todos los issues de apache/kvrocks
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
cloudflare/workerd#8290 ·
Los mantenedores suelen responder en 1 día
-
scripts/moe-cache-tune.py: device_room() under-reports free VRAM when a draft model is loadedPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
Vector35/binaryninja-api#8715 ·
Los mantenedores suelen responder en 2 días
-
ai_p3 comp-database-engines
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ClickHouse/ClickHouse#130186 ·
Los mantenedores suelen responder en 1 día
-
(S1 - Need confirmation)
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
CleverRaven/Cataclysm-DDA#89476 ·
Los mantenedores suelen responder en 1 día