hyperf / hyperf/socketio-server
【BUG】 socketio:clear 命令异常, 当 redis 配置了 prefix 选项后,一定会出现清除失败!
- Lenguaje dominante
- PHP
- Estrellas
- 26
- Forks
- 6
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
redis配置了前缀,并且 scan 配置了Redis::SCAN_PREFIX (其实配置不配置,都会出现问题,只要redis的options配置了前缀)
情况1:
当 scan 选项没有配置时,则scan默认为不加前缀,则调用 scan 命令获取不到keys,所以就没有清除的效果
情况2:
当 scan 选项配置为Redis::SCAN_PREFIX 时,则调用scan 命令能获取到keys, 但这些key是原始的key (添加了前缀), 则调用 del 命令会失败 (因为del也会自动添加前缀,就导致添加了两次前缀).
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Start by tracing the socketio:clear command and how its Redis scan and delete operations handle configured prefixes. Reproduce the issue with a Redis prefix, testing both the default scan behavior and Redis::SCAN_PREFIX. Done means the command finds and deletes the intended keys without applying the prefix twice.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- php, redis
- Área
- backend, databases
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 52/100