Skip to content

Clarify paging behaviour around data changes #453

@captaincoordinates

Description

@captaincoordinates

What is the expected behaviour for paging within search results around the time of a data change? Is this considered a specification concern, or is it at the discretion of the implementer? Can this be documented?

For example:

  • Caller executes a search where result size > limit
  • STAC API returns next link
  • Data change occurs which alters the content or sort order of the search
  • Caller requests the next link

The following all seem like viable options:

  • continue as if nothing has changed, potentially resulting in
    • an empty result set or error if the caller pages "off the end" of a result set which has reduced in size
    • a gap in the data where the first item of the next page no longer follows the last item of the previous page because sort order has changed either due to new items or changes to existing items
    • repeated data from an earlier page because sort order has changed either due to new items or changes to existing items
  • page according to the state of the result set at the time of the initial search, potentially requiring long-lived or expensive data snapshots
  • return a 4xx response informing the caller that their request is no longer valid. Several 4xx status codes could be appropriate here

Any thoughts much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions