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

Use Redis Sentinel for Caching/Async Queries

Abierto
#783 0 comentarios 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
55/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
kubernetes, redis

Línea de trabajo

Empieza rastreando la configuración existente de Redis y Celery introducida por PR 724, incluida la sobrescritura de superset_config.py y los puntos de entrada de CeleryConfig. Compárala con RedisSentinelCache y la solución alternativa sentinel:// mostrada aquí; se considera terminado cuando Redis Sentinel pueda configurarse tanto para la caché como para el broker y los resultados de las consultas asíncronas sin sobrescrituras manuales, incluido el nombre del master.

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

Descripción

customer-request

Description

The PR https://github.com/stackabletech/superset-operator/pull/724 added celery worker support using Redis following the standard Superset example: https://superset.apache.org/admin-docs/configuration/async-queries-celery/

  • This only works for RedisCache not RedisSentinelCache
  • The schema used is always redis:// instead of sentinel://
  • The master-name cannot be configured for sentinel nodes

So Redis in HA mode is not available without overrides (not tested).

Possible untested fix

configOverrides:
  superset_config.py:
    FILE_FOOTER: |
      from flask_caching.backends.rediscache import RedisSentinelCache
      _SENTINELS = [("redis-sentinel-0.redis-sentinel-headless", 26379),
                    ("redis-sentinel-1.redis-sentinel-headless", 26379),
                    ("redis-sentinel-2.redis-sentinel-headless", 26379)]
      _MASTER = "mymaster"
      _PW = os.environ["CELERY_RESULTS_BACKEND_DATABASE_PASSWORD"]

      RESULTS_BACKEND = RedisSentinelCache(
          sentinels=_SENTINELS, master=_MASTER, password=_PW, db=0,
          key_prefix="superset_results",
          # sentinel_password=..., only if the sentinels themselves require auth
      )

      _URL = ";".join(f"sentinel://:{_PW}@{h}:{p}" for h, p in _SENTINELS) + "/0"
      class CeleryConfig(object):
          broker_url = _URL
          result_backend = _URL
          broker_transport_options = {"master_name": _MASTER}
          result_backend_transport_options = {"master_name": _MASTER}
          imports = ("superset.sql_lab", "superset.tasks.scheduler")
          worker_prefetch_multiplier = 10
          task_acks_late = True
          task_annotations = {"sql_lab.get_sql_results": {"rate_limit": "100/s"}}
      CELERY_CONFIG = CeleryConfig

This is just a workaround and will need adaptation whenever the redis replicas change.

Issue checklist

This is a simple checklist of things to bear in mind when creating a new issue.

  • Describe the use-case: As far as possible, use the pattern "As a [type of user], I would like [feature/functionality] to be able to do [specific action]." This helps identify the feature and the problem it addresses.
  • Indicate importance and urgency: Use a scale (e.g., low, medium, high) to indicate the level of importance and urgency.
  • Work-around: If there is a known work-around, describe it briefly.
  • Environment: Describe the environment where the issue occurs (e.g., SDP version, K8S version, etc.).
Lenguaje dominante
Rust
Estrellas
35
Forks
4
Merge medio
1 d 17 h
PR fusionados (30 d)
12

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

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 stackabletech/superset-operator

Todos los issues de stackabletech/superset-operator

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.