Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

Comment thread
cjen1-msft marked this conversation as resolved.
## [7.0.2]

[7.0.2]: https://github.com/microsoft/CCF/releases/tag/ccf-7.0.2
Expand Down
24 changes: 11 additions & 13 deletions samples/apps/logging/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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
Expand Down