Skip to content

Fix early exit of /log/public/historical/range when there are empty pages#7869

Open
cjen1-msft wants to merge 6 commits intomicrosoft:mainfrom
cjen1-msft:long-test-fix
Open

Fix early exit of /log/public/historical/range when there are empty pages#7869
cjen1-msft wants to merge 6 commits intomicrosoft:mainfrom
cjen1-msft:long-test-fix

Conversation

@cjen1-msft
Copy link
Copy Markdown
Contributor

@cjen1-msft cjen1-msft commented May 7, 2026

When we reduced the logging page size in a recent test we had a failure where the range query did not turn up the entry.

This is because if there is is an empty page (not the first page), then the range query would exit early rather than directing the client to continue iterating past it.

One possible optimisation here is that the @nextlink could skip across that empty page, but this version is obviously correct, if slightly inefficient.

This was tested using a reduced page size of 10, and submitting 10 txs and their signatures. with an 11th tx which we then queried for.

@cjen1-msft cjen1-msft requested a review from a team as a code owner May 7, 2026 15:45
Copilot AI review requested due to automatic review settings May 7, 2026 15:45
@cjen1-msft cjen1-msft changed the title Remove premature optimisation of ending iter on empty page Fix early exit of /log/public/historical/range when there are empty pages May 7, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes the logging sample app’s historical range pagination so clients continue iterating across empty pages, rather than terminating early when a non-first page contains no entries.

Changes:

  • Always emit @nextLink (via response.next_link) when the requested historical range isn’t fully covered yet, even if the next page is empty.
  • Keep prefetch behaviour only when the next page is known (via the index) to contain interesting seqnos.
  • Add a changelog note describing the fix.

Custom instructions used:

  • .github/copilot-instructions.md
  • .github/instructions/reviewing.instructions.md
  • .github/instructions/changelog.instructions.md

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
samples/apps/logging/logging.cpp Removes early-exit pagination optimisation by always returning a next_link when more of the requested seqno range remains.
CHANGELOG.md Adds a “Fixed” entry describing the logging app pagination fix.

Comment thread CHANGELOG.md
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread CHANGELOG.md Outdated
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@cjen1-msft
Copy link
Copy Markdown
Contributor Author

Waiting for the mypy fix in #7867

@achamayou achamayou added the run-long-test Run Long Test job label May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-long-test Run Long Test job

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants