Skip to content

Stream query pages and batch modifyRecords by zone and size #499

Open

Description

@leogdion

queryAllRecords collects every page into an array, so a caller counting records or showing progress has to write its own paging loop. modifyRecords takes one zone and at most 200 operations, so callers split batches themselves.

Proposal: an AsyncThrowingStream of query pages (with the stuck-continuation-marker guard queryAllRecords has), added alongside queryRecords rather than changing its return type (see #147); and modifyAllRecords, which groups operations by zone, splits at maxRecordsPerRequest and sets atomic per zone.

Found while building brightdigit/Mistico (vendored at Packages/MistKit, branch mistico from v1.0.0-beta.6). Tracked in brightdigit/Mistico#119.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions