From 16b02afb04841bdfc6a3098f71bd4cff92d05a42 Mon Sep 17 00:00:00 2001 From: cjen1-msft Date: Thu, 7 May 2026 16:41:00 +0100 Subject: [PATCH 1/5] Remove premature optimisation of ending iter on empty page --- samples/apps/logging/logging.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/samples/apps/logging/logging.cpp b/samples/apps/logging/logging.cpp index 18440332cbc..110f5812b2b 100644 --- a/samples/apps/logging/logging.cpp +++ b/samples/apps/logging/logging.cpp @@ -1914,6 +1914,9 @@ namespace loggingapp std::min(to_seqno, next_page_start + max_seqno_per_page); const auto next_seqnos = index_per_public_key->get_write_txs_in_range( id, next_page_start, next_range_end); + + // if we know the next page has some interesting seqnos, begin + // fetching them if (next_seqnos.has_value() && !next_seqnos->empty()) { const auto next_page_end = next_seqnos->back(); @@ -1924,19 +1927,14 @@ namespace loggingapp next_page_handle, next_page_start, next_page_end); } - // If we don't yet know the next seqnos, or know for sure there are - // some, then set a next_link - if (!next_seqnos.has_value() || !next_seqnos->empty()) - { - // NB: This path tells the caller to continue to ask until the end - // of the range, even if the next response is paginated - response.next_link = fmt::format( - "/app{}?from_seqno={}&to_seqno={}&id={}", - get_historical_range_path, - next_page_start, - to_seqno, - id); - } + // NB: This path tells the caller to continue to ask until the end + // of the range, even if the next response is paginated + response.next_link = fmt::format( + "/app{}?from_seqno={}&to_seqno={}&id={}", + get_historical_range_path, + next_page_start, + to_seqno, + id); } // Construct the HTTP response From fc9b45c36ba0e9615ba98f3dae03d68e18ca27c2 Mon Sep 17 00:00:00 2001 From: cjen1-msft Date: Thu, 7 May 2026 16:43:22 +0100 Subject: [PATCH 2/5] changelogging --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76c7787d782..02ffc12e114 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Upgraded QuickJS from 2024-01-13 to 2025-09-13 (#7849). - On a joiner's first attempt, the primary now requires the joiner's startup seqno to be at least as recent as the primary's latest committed snapshot on disk, preventing snapshot-less joiners from replaying the entire ledger (#7844). +### Fixed + +- logging app now correctly sets @nextLink across empty pages + ## [7.0.2] [7.0.2]: https://github.com/microsoft/CCF/releases/tag/ccf-7.0.2 From 5e1ce8e2329c8d78d74586a9543be6f08a129986 Mon Sep 17 00:00:00 2001 From: cjen1-msft Date: Thu, 7 May 2026 16:47:24 +0100 Subject: [PATCH 3/5] changelogging pr num --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02ffc12e114..53a23c79a13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed -- logging app now correctly sets @nextLink across empty pages +- logging app now correctly sets @nextLink across empty pages (#7869) ## [7.0.2] From 53844dbf51b6e5fca115bd526cc3787dc7a6b1fe Mon Sep 17 00:00:00 2001 From: cjen1-msft Date: Thu, 7 May 2026 16:49:00 +0100 Subject: [PATCH 4/5] better changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53a23c79a13..585e2016884 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed -- logging app now correctly sets @nextLink across empty pages (#7869) +- Fix early exit of /log/public/historical/range when there are empty pages (#7869) ## [7.0.2] From c6d0c5166604c82214d21cce14bf1448741844eb Mon Sep 17 00:00:00 2001 From: cjen1-msft Date: Thu, 7 May 2026 16:55:36 +0100 Subject: [PATCH 5/5] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 585e2016884..c8e96c39f1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed -- Fix early exit of /log/public/historical/range when there are empty pages (#7869) +- Fix early exit of /log/public/historical/range when there are empty pages (#7869). ## [7.0.2]