Skip to content

Conversation

@maxtropets
Copy link
Collaborator

@maxtropets maxtropets commented Oct 24, 2025

A somewhat ugly attempt to solve #6558. See if CI's happy.

UPD. CI is happy, I don't think there's both better and cheap way (in terms of interface changes) to fix this.

  • Maybe worth e2e test (fail-before/pass-after)?..
  • Schema test fix

@maxtropets maxtropets self-assigned this Oct 24, 2025
@maxtropets maxtropets added run-long-test Run Long Test job bench-ab labels Oct 24, 2025
@maxtropets maxtropets changed the title [DRAFT] Avoid mixing up app/non-app historical state handles Avoid mixing up app/non-app historical state handles Oct 24, 2025
@maxtropets maxtropets force-pushed the f/historical-handles-mixup branch from d6ad7bd to efc6b1c Compare October 27, 2025 23:48
@maxtropets maxtropets marked this pull request as ready for review October 27, 2025 23:49
@maxtropets maxtropets requested a review from a team as a code owner October 27, 2025 23:49
Copilot AI review requested due to automatic review settings October 27, 2025 23:49
Copy link
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

This PR addresses issue #6558 by preventing confusion between application and system historical state handles. The changes introduce a CompoundHandle type that pairs a RequestNamespace (System/App) with a RequestHandle, ensuring that system-level historical queries don't interfere with application-level queries when sequence numbers overlap.

Key changes:

  • Modified internal historical query functions to use system-specific handles via make_system_handle()
  • Added a new endpoint demonstrating custom handle usage for historical queries
  • Added test coverage for the handle separation behavior

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/node/historical_queries_utils.cpp Updated to use system-specific handles when fetching previous service identities and endorsements
src/node/historical_queries.h Removed extraneous blank line
src/node/historical_queries_adapter.cpp Removed outdated comment about buffer size calculation
samples/apps/logging/logging.cpp Added new endpoint and handler demonstrating custom handle usage for historical queries
tests/recovery.py Added test case verifying that overlapping seqnos work correctly with handle separation

maxtropets and others added 3 commits October 28, 2025 09:33
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@maxtropets maxtropets removed run-long-test Run Long Test job bench-ab labels Oct 28, 2025
@achamayou achamayou enabled auto-merge (squash) October 28, 2025 20:28
@achamayou achamayou merged commit 5922009 into microsoft:main Oct 28, 2025
22 of 23 checks passed
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.

3 participants