Consider JSONField in place of the RepositoryVersionContentDetails model
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
The pre-computed counts live in the RepositoryVersionContentDetails model in pulpcore/app/models/repository.py (around lines 1512-1527), and the version list reads them through pulpcore/app/serializers/repository.py (around line 248). Read both, then decide how a JSONField on RepositoryVersion would store and serialize the counts, which needs a maintainer decision and a migration. Done means the design is agreed, the migration and serializer output match the existing API, and the N+1 query is gone.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
RepositoryVersionContentDetails serves as a pre-calculated content count originally intended to accelerate the repository version list endpoint.
It looks like this:
One is saved per (rv, content_type, count, count_type) combination.
It might be better to just store the info in a JSONField on RepositoryVersion directly. That solves an N+1 issue as you would no longer need to perform additional (potentially many additional) queries to fetch counts for different content types or added/removed/present states, and likewise across different RVs. It may even be possible to serialize the value directly (or with minimal transformation). Note that N+1 is actually the case with the current repository version list operation, as the count objects are queried per-version (this is still much less expensive than the original count queries per version).
The schemaless drawbacks are somewhat minimal given the existing model already uses string types for content types and added/removed.
It may incur minor additional costs when querying RVs if it is not required. But likely (though not guaranteed) much less than the opposite case.
- Lenguaje dominante
- Python
- Estrellas
- 606
- Forks
- 174
- Merge medio
- 16 h 44 min
- PR fusionados (30 d)
- 107
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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 pulp/pulpcore
-
Reclaim Space Server ErrorAbiertoIssue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
pulp/pulpcore#5802 · 10 comentarios ·
Los mantenedores suelen responder en 1 día
-
Content app answers 404 instead of 502 when the remote of on-demand content is unavailablePosiblemente ocupada @gigi206 la tomó hace 2 días. Abierto
Dificultad 3/5 Medio día Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 28/100
pulp/pulpcore#8214 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Issue Triage-Needed
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de pulp/pulpcore
Issues similares
-
fix formatting of the sample database page of the docsPosiblemente ocupada @Aaqibhafeezkhan la tomó hoy. Abiertodocumentation good first issue help wanted
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
chaoss/CollectOSS#544 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area/plugin good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
kestra-io/plugin-soda#137 ·
-
Dificultad 2/5 Medio día Aptitud para principiantes 62/100
ibm-granite/granite.build#504 ·
Los mantenedores suelen responder en 2 días
-
`LazyFrameRemote` and `ExecuteRemote` sinks do not accept `Path`, like `LazyFrame` sinks do.Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día