Skip to content

Unify the two pagination stacks into one #30

Closed

Description

@OmarAlJarrah

Problem

Two parallel pagination implementations exist — pagination/* (Paginator + Page + strategies) and http/paging/* (PagedIterable + PagedResponse + PagingOptions) — with different close semantics. PagedIterable.byPage() leaks a connection unless the caller closes (PagedIterable.kt:100-105).

Proposed change

Collapse to one stack: a single Page<T> + driver, enriched with the links/status/headers that PagedResponse carries. Preserve the max-pages cap, per-page close, and interrupt-aware blocking. Eliminate the byPage leak.

Acceptance

  • One pagination surface
  • No connection leak on partial consumption
  • Tests + apiDump

Coordinate with async pagination + exception collapse.

Dependencies


Priority: high · Effort: large

Activity

  1. added
    sdk-core
    tech-debt
    on Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    sdk-coretech-debt

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions