Workflow branch store and request-controller operation store grow without bound
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
Examine the WP_Agent_Workflow_Branch_Store class and the request controller's operation store to understand their storage mechanisms. Look for the TTL_SECONDS constant and the forget_run() method. Identify where a sweeper could be added, perhaps via Action Scheduler. For the request controller, find the option key and operation array structure to implement pruning or splitting.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
Two workflow stores grow without bound on a long-lived site. On a primary-mode Markdown-backed install used daily, after about two weeks:
WP_Agent_Workflow_Branch_Storeoptions are never swept.- 5,453 options accumulated:
agents_wf_branch_*3,247,agents_wf_branch_ctx_*1,013,agents_wf_branch_index_*1,013,agents_wf_branch_admission_*180. The oldest is from 11 days earlier. - Rows carry
expires(TTL_SECONDS = 7200), but expiry is only honoured on read. Rows are deleted only byforget_run()/forget_reconcile_receipt()when a run terminalizes, so any run that never resumes (stranded branches, crashed workers, a queue that stopped draining) leaves its rows forever.
- 5,453 options accumulated:
- The request controller's operation store has no retention.
- All operations for one controller key live in a single option. For one consumer's key it reached 9.9 MB.
- That option is rewritten on each operation transition. On that backend, a write of this size measured about 1.5 s and a read about 48 ms, on every search the consumer runs.
Both costs scale with option count and size on any backend; they're just most visible on file-backed storage.
Suggested direction
- Branch store: a bounded sweeper (for example, on the existing Action Scheduler recurring hook, or piggy-backed on dispatch) that deletes rows whose
expireshas passed and whose run is terminal or unknown. - Request controller: prune terminal operations past a retention window (and/or cap the count), and consider one option per operation, or a table, instead of one ever-growing array.
Related: storage-side latency fixes in Automattic/markdown-database-integration#429 make these writes cheaper, but don't remove the growth.
AI disclosure: measured and written up by Claude (Anthropic) via OpenCode/Kimaki at Chris Huber's direction.
- Lenguaje dominante
- PHP
- Estrellas
- 33
- Forks
- 8
- Merge medio
- 25 min
- PR fusionados (30 d)
- 20
Preparar el entorno
Aún no hemos revisado los archivos de configuración de este proyecto. 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 Automattic/agents-api
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Automattic/agents-api#564 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
Automattic/agents-api#560 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Automattic/agents-api#552 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
Automattic/agents-api#551 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
Automattic/agents-api#550 ·
Los mantenedores suelen responder en 1 día
Todos los issues de Automattic/agents-api
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Awaiting Triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
WordPress/two-factor#1008 ·
Los mantenedores suelen responder en 1 día
-
sync-en
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día