Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(paging): add support for after id parameter in find options #19219

Merged
merged 4 commits into from
Aug 25, 2020

Conversation

GeorgeMac
Copy link
Contributor

@GeorgeMac GeorgeMac commented Aug 5, 2020

Closes #19218

This PR adds support for the after parameter in the FindOptions struct.

after is more sympathetic to the structure and interfaces of our K/V store implementations; as opposed to offset.
The K/V stores we use support seek operations to particular keys, but not numerical index offsets like we expose through our APIs.

To use this feature for pagination, you simply supply after with the last ID observed in a list of results.

This PR includes an implementation for after in both the tenant and kv bucket services.

Outstanding:

  • Figure how widely used the paging links are leveraged and what needs to change to add support for auto-paging links using after.
    Im going to forgo forcing the use of after via the paging links for now as offset / limit suffice.

  • CHANGELOG.md updated with a link to the PR (not the Issue)
  • Well-formatted commit messages
  • Rebased/mergeable
  • Tests pass
  • http/swagger.yml updated (if modified Go structs or API)
  • Documentation updated or issue created (provide link to issue/pr)
  • Signed CLA (if not already signed)

@GeorgeMac GeorgeMac force-pushed the gm/find-options-after branch from 815e347 to 0bbf40e Compare August 5, 2020 13:29
@GeorgeMac GeorgeMac force-pushed the gm/find-options-after branch 2 times, most recently from ce61f65 to 054e025 Compare August 21, 2020 10:03
@GeorgeMac GeorgeMac force-pushed the gm/find-options-after branch from 054e025 to 685f0a1 Compare August 21, 2020 10:06
@GeorgeMac GeorgeMac requested a review from a team as a code owner August 21, 2020 12:26
@GeorgeMac GeorgeMac requested review from ebb-tide and removed request for a team August 21, 2020 12:26
@GeorgeMac GeorgeMac requested review from a team and gavincabbage and removed request for a team August 21, 2020 12:29
Copy link
Contributor

@gavincabbage gavincabbage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM- will this help @RohanSreerama5's work on #19288 by any chance?

@GeorgeMac
Copy link
Contributor Author

I am afraid not @gavincabbage

@GeorgeMac GeorgeMac merged commit 45a3f2e into master Aug 25, 2020
@jacobmarble jacobmarble deleted the gm/find-options-after branch January 2, 2024 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support after in influxdb.FindOptions
3 participants