livepeer / livepeer/studio

Enforce an upper limit on list API/queries

Open
#437 0 comments 0 reactions 1 assignee View on GitHub

@victorges is already working on this.

Since Jun 9, 2021.

team: studio
Dominant language
TypeScript
Stars
88
Forks
37
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug (required)**
Having the list queries with an unchecked limit for the number of items leaves the
database exposed to queries with a too high limit that may impact its performance.

**Expected behavior (required)**
We should have both a default value for the limit parameter when it is not set, as well as
a maximum allowed value so one doesn't ask for a virtually infinite limit anyway.

**To Reproduce (required)** Steps to reproduce the behavior:
Make list queries without any limit and get all results at once.

**Device (required):**
Any

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.