~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

`listRepos` gives a cursor even on its last, short page

Closed
Closed chadtmiller.com opened this issue 0 comments

What happened

cursor = writers.last().map(..) is set whenever the page is not empty. A space with 3 writers, asked with limit=100, answers 3 repos and a cursor, so a syncer always makes one more request, which comes back empty. The host's other lists give a cursor only on a full page (for example space_api.rs:248-251).

How to see it

Read against docs/fresh at 4636e6d, the code at: authority_api.rs:191 (list_repos). Paths are under crates/group-host/src unless they say otherwise. Severity: low.

What you expected

.filter(|_| writers.len() == limit as usize), as listRecords does.

Where

The host, as built from 4636e6d. Found while checking the docs against the code.