Skip to content

discussion: browse objects does not allow cursor-style paging #991

@kopertop

Description

@kopertop

Previously, there was a method called browse that allowed us to start a browse request, get a response, and then call browseFrom to continue browsing when we'd processed that initial batch and were ready for another one. Now, it appears all we have an option for is browseObjects, which takes a function to call for each "batch".

This has several issues with our current workflow:

  1. It is nothing like the "search" method
  2. It does not allow "cancelling" a browse (such as if we've hit the limit of how many we want to process)
  3. If batch operations take a while and are asynchronous, this could cause memory issues (imagine processing 100m records all at once without any delay between batches).

It does appear the browseObjects function allows passing in a cursor, but it has no option to return results and not continue.

Proposed solution:

Allow an option to browseObjects that lets us call it the "old" way, or provide a new function browse and browseFrom like the old library supported.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions