kernelci / kernelci/kernelci-api

API limit restrict output to user, but doesn't restrict amount of data from mongodb

Abierto
#549 8 comentarios 0 reacciones 0 asignados Ver en GitHub
bug critical techdebt
Lenguaje dominante
Python
Estrellas
10
Forks
21
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

If we do two queries:
curl "https://staging.kernelci.org:9000/latest/nodes?kind=test&limit=1"
real 0m5.994s
user 0m0.012s
sys 0m0.000s

curl "https://staging.kernelci.org:9000/latest/nodes?kind=checkout&limit=1"
real 0m0.023s
user 0m0.012s
sys 0m0.000s

We can notice significant difference in response time. While it should be fast both (kind is indexed).

On preliminary investigation reason is that search query submitted to mongodb without limit parameter, which is causing very large output in case of some queries.
We need to resolve that, as it is also causing excessive load on database and ram consumption.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Start by tracing the /latest/nodes endpoint and its MongoDB query, using the two curl examples to compare kind=test and kind=checkout with limit=1. Confirm that the requested limit reaches the database query, then verify response timing and database resource use for both cases.

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

Evaluación

Stack tecnológico
mongodb, python
Área
api, backend, databases
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.