Skip to content

Rethink default MongoDB count strategy #2251

@ml-evs

Description

@ml-evs

#2247 changed the default MongoDB count timeout to 0.5 seconds, which means it will usually fail quickly for any sizable query. This has limited utility in the case where the user actually just wants to know the number of results without pagination. I suggest a hybrid strategy where the MongoDB timeout is allowed to be quite large for the first page of results, but then is very small for all subsequent pages. This should make pagination significantly faster, and savvy clients can just cache the value of the number of results from the first response they get.

Metadata

Metadata

Assignees

No one assigned

    Labels

    serverIssues pertaining to the example server implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions