-
Couldn't load subscription status.
- Fork 241
Avoid mixing up app/non-app historical state handles #7406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid mixing up app/non-app historical state handles #7406
Conversation
d6ad7bd to
efc6b1c
Compare
There was a problem hiding this 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 |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.