Consider JSONField in place of the RepositoryVersionContentDetails model
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 606
- Fork
- 174
- Merge medio
- 14h 6m
- PR unite (30g)
- 101
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pulp/pulpcore
-
Reclaim Space Server ErrorApertaIssue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
pulp/pulpcore#5802 · 10 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Content app answers 404 instead of 502 when the remote of on-demand content is unavailableForse già presa @gigi206 l’ha presa oggi. Aperta
Difficoltà 3/5 Mezza giornata Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 28/100
I maintainer di solito rispondono entro 1 giorno
-
Issue Triage-Needed
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di pulp/pulpcore
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
task
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
danparshall/claude_researcher#87 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
datajoint/datajoint-python#1586 ·
I maintainer di solito rispondono entro 1 giorno
-
1D intercept of length 1 is accepted as `fix_params` in population GLM with more than 1 unitForse già presa @dhvani7014 l’ha presa oggi. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
flatironinstitute/nemos#642 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Broken links in the docsAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
uniswap-python/uniswap-python#487 ·