You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Large search limits overflow pagination in in-memory, OSS and COS stores #4412
InMemoryStore, OssBaseStore and CosBaseStore compute the page end as Math.min(start + limit, size) using int arithmetic. A valid large positive limit such as Integer.MAX_VALUE overflows as soon as a positive offset is used. Even searching beyond the end of a short result set throws instead of returning an empty page.
Reproduction
Store two entries a and b in one namespace, then call search(namespace, Integer.MAX_VALUE, 1). Expected: [b]; actual: an invalid subList range. Reproduced independently against the in-memory store and both object-storage SDK fixtures on main@5a315a9af. All three regressions execute, with zero skips; no cloud credentials or live cloud service is involved.
Proposed scope
Clamp the requested page length to the number of remaining entries before adding it to the start index. Preserve existing listing, key ordering and positive pagination behavior. Add regressions for a large limit, an offset past the last item and ordinary page boundaries across all three affected implementations. No new API, shared abstraction, dependency or cloud storage format changes.
Activity