GET /Persons never returns on a library with tens of thousands of people #77
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
GET /Personsnever returns on a library with tens of thousands of people.Measured against a database copied from a running Jellyfin — 55,523 items, of
which 32,488 are
Personrows, 14 users. Both servers were given their own copyof it and asked the same question:
GET /Persons?Limit=50&SortBy=SortNameGET /Persons?Limit=50&SortBy=SortName&StartIndex=20000It is not blocked — the process holds a core at 90% for as long as it is left
to. So this is work being done, not a lock, and the amount of it does not look
bounded by
Limit.Two separate things are in that table.
The one that matters is the cost.
Limit=50asks for fifty rows and getsneither fifty rows nor an answer. Whatever the by-name person listing does, it
does not stop at the page. Against the
defaultsnapshot — onePersonrow —the same request is instant, which is why nothing has caught it: the fixture has
never had enough rows for the shape of the work to show.
The second is that upstream answers 52 bytes. That is an empty list, not
fifty people, so the two servers do not agree about what the route means either.
Worth settling before the cost is fixed, because "what should it return" decides
which query is the right one to make fast. Upstream's
/Personsfilters topeople attached to something the user can see; ours appears to consider all
32,488.
To reproduce. Any library with enough people will do; the count matters and
nothing else does.
SELECT count(*) FROM BaseItems WHERE Type LIKE '%Person'says whether alibrary is big enough to show it. At 32,488 it is; at 1 it is not.