Skip to content

fix(catalog): the next-page token of a filtered listing belongs to the last returned item - #2278

Merged
c-thiel merged 1 commit into
mainfrom
ct/page-token-last-returned
Nov 12, 2026
Merged

c-thiel merged 1 commit into
mainfrom
ct/page-token-last-returned

Conversation

@c-thiel

@c-thiel c-thiel commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

When a listing hides items the caller may not see, its next-page token could belong to a hidden namespace, table or view and reveal that item's id and creation time. The token now always belongs to the last item returned. The next page reads the hidden items after it again.

Summary by CodeRabbit

  • Bug Fixes
    • Pagination now stops after collecting the requested number of authorized results, returning a token for that page without scanning later entries.

…e last returned item

When a listing hides items the caller may not see, its next-page token could belong to a hidden namespace, table or view and reveal that item's id and creation time. The token now always belongs to the last item returned. The next page reads the hidden items after it again.
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

take_n_authz_approved now returns as soon as it collects the requested number of approved entities. The return includes the current row’s token. A test covers a denied row after the selected entity.

Changes

Approved page selection

Layer / File(s) Summary
Return at the requested count
crates/lakekeeper/src/server/mod.rs
The function returns the current row’s token when it reaches the requested count. A test checks that taking one approved entity returns entity a, ID 1, and token-a when the following row is denied.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: twuebi

Merge Risk: Minimal · up to e0563

The change makes the next-page token of a filtered listing belong to the last item returned, so a hidden item's ID and creation time are no longer exposed. No actionable merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the next-page token of a filtered listing now belongs to the last returned item, which matches the summary (take_n_authz_approved stops at the requested count and retu…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the next-page token of a filtered listing now belongs to the last returned item, which matches the summary (take_n_authz_approved stops at the requested count and returns that entity's token) and the objective of not leaking hidden items through the token. It is specific, single-sentence, and avoids vague terms. The 89-character length is slightly long but acceptable.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checked the rows in line,
And stopped when one approved would shine.
It kept that row’s token near,
Then hopped past rows it need not clear.
The test confirms the page is fine.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 15fccf23-842e-450f-805b-addd44fe2503
Commits

Reviewing files that changed from the base of the PR and between 179d7a7 and e0563f1.

Files selected for processing: 1

  • crates/lakekeeper/src/server/mod.rs

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor

✅ PR Title Formatted Correctly

The title of this PR match the correct format. Thank you!

@c-thiel
c-thiel enabled auto-merge (squash) November 12, 2026 10:25
@c-thiel
c-thiel merged commit c18bc33 into main Nov 12, 2026
73 checks passed
@c-thiel
c-thiel deleted the ct/page-token-last-returned branch November 12, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant