API limit restrict output to user, but doesn't restrict amount of data from mongodb
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 35/100
研究方向
首先追蹤 /latest/nodes 端點及其 MongoDB 查詢,使用兩個 curl 範例比較帶有 limit=1 的 kind=test 和 kind=checkout。確認要求的 limit 已傳遞至資料庫查詢,然後驗證兩種情況下的回應時間和資料庫資源使用情況。
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- Python
- 星號
- 10
- 分支
- 22
- 平均合併
- 22 分鐘
- 30 天內合併 PR
- 1
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
kernelci/kernelci-api 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 45/100
kernelci/kernelci-api#706 ·
-
Components/Maestro/API/Local instance says GET /latest/ should return some JSON, but it doesn't可能重新可做 關聯的 PR 已關閉且未合併。 未關閉documentation
難度 3/5 1-2 天 新手友好度 35/100
kernelci/kernelci-api#632 · 1 則留言 ·
-
難度 5/5 一週以上 新手友好度 20/100
kernelci/kernelci-api#629 ·
-
難度 4/5 3-5 天 新手友好度 35/100
kernelci/kernelci-api#608 ·
-
password creation: non-fatal bcript error output可能已有人在做 @Hao-Chen2337 於 11 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 35/100
kernelci/kernelci-api#597 · 2 則留言 ·
查看 kernelci/kernelci-api 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 84/100
維護者通常 1 天內回覆
-
Status: Triaged Type: Enhancement
難度 1/5 1 小時以內 新手友好度 82/100
canonical/craft-store#448 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 74/100
維護者通常 1 天內回覆
-
good first issue research size:s skill:numerics sub-issue
難度 2/5 1-3 小時 新手友好度 78/100
SKaiNET-developers/SKaiNET#1372 ·
維護者通常 1 天內回覆
-
debt
難度 2/5 1-3 小時 新手友好度 68/100
microsoft/vscode-flake8#601 ·
維護者通常 1 天內回覆