Retention for expired decisions, independent of alert retention
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
Línea de trabajo
Start by reading the existing flush.max_age behavior and FlushOrphans, then review issue #4613 for measurements of the longestDecisionForScopeTypeValue query shape. The change should allow expired decisions to be retained independently of their parent alerts while preserving the configured window for reporting deletions to bouncers. Verify the new behavior and configuration with tests, including the stated trade-off for inspecting old alerts.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
/kind enhancement
What would you like to be added?
A retention setting for expired decisions that's independent of alert retention — something like db_config.flush.decisions_max_age. Expired decision rows would be deleted that long after they expire, separately from their parent alert, much as FlushOrphans already deletes ownerless expired decisions.
Why is this needed?
flush.max_age is currently doing three unrelated jobs:
- how long alerts stay queryable
- how much dead weight every stream query walks through
- how long an expired decision stays reportable to bouncers in the
deletedarray
There's no way to tune them separately, and 1 and 3 pull against each other.
On our LAPI (~1.2k bouncers, 60s poll) decisions sits at 612k rows with 301k already expired: a 6-hourly blocklist import with an 8h TTL against max_age: 26h leaves each batch dead in the table for 18h. Every startup=true resync walks all of it through the longestDecisionForScopeTypeValue anti-join — #4613 has measurements for that query shape.
Pushing the ban TTL past max_age fixes the bloat, since #4527 keeps an alert alive while its decisions are active. But then the alert is flushed within a minute of the last decision expiring and the cascade hard-deletes the rows, so a bouncer only learns about the unban if it polls inside that ~60s window. Roughly half the fleet misses it.
What I'd like to be able to configure: 7d of alert history, deletions reported for 12h, and not carrying 7d of expired decisions in every stream query.
The obvious cost is that cscli alerts inspect on an old alert would show fewer decisions than it does today. That seems like the right trade to me, but it's a behaviour change worth naming.
- Lenguaje dominante
- Go
- Estrellas
- 15.1k
- Forks
- 726
- Merge medio
- 1 d 10 h
- PR fusionados (30 d)
- 15
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 crowdsecurity/crowdsec
-
[docker] Align build and debian releasePosiblemente ocupada @albundy83 la tomó hace 2 días. Abiertokind/enhancement needs/triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
crowdsecurity/crowdsec#4803 · 3 comentarios ·
Los mantenedores suelen responder en 2 días
-
Bucket queues preallocate all their slots when the bucket is createdPosiblemente ocupada @AdzerKI la tomó hace 4 días. Abiertokind/bug needs/triage os/linux
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
crowdsecurity/crowdsec#4799 · 3 comentarios ·
Los mantenedores suelen responder en 2 días
-
"Machine is not enrolled in the console, can't synchronize with the console" should not be an error logPosiblemente ocupada @bharathvemula la tomó hoy. Abiertokind/bug needs/triage os/linux
Dificultad 2/5 1-3 horas Aptitud para principiantes 30/100
crowdsecurity/crowdsec#4809 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
kind/bug needs/triage os/linux
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
crowdsecurity/crowdsec#4797 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
needs/kind needs/triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
crowdsecurity/crowdsec#4795 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
Todos los issues de crowdsecurity/crowdsec
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
-
Component: Backup and Restore Type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
needs-acceptance wg/router-models-inference-runtime
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
vllm-project/semantic-router#6018 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
eugenioenko/ttt#1461 ·
Los mantenedores suelen responder en 1 día
-
tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día