Skip to content
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

fix(resharding): MissingTrieValue in tests #12677

Merged
merged 2 commits into from
Jan 2, 2025
Merged

Conversation

staffik
Copy link
Contributor

@staffik staffik commented Jan 2, 2025

Partially applies the patch: #12597

It was failing for delayed receipt tests with MissingTrieValue(TrieStorage) inside
check_state_shard_uid_mapping_after_resharding.
The reason is that trie access interface returns None for a key with an empty value (which is the case for delayed receipts and negative refcounts).
That was not caught up before the patch, because the check_state_shard_uid_mapping_after_resharding was called after resharding, but not in the end of the test (after gc kicked in).

Changes
This PR modifies the check_state_shard_uid_mapping_after_resharding to not check entries with negative refcount.
The test is refactored so that the main loop does not finish an epoch after resharding, but keeps running until gc kicks in.
For that, the code responsible for testing temporary account is moved to a loop action,
and all loop actions are moved to a separate file for readability.

Note
test_resharding_v3_yield_resume is still failing with the original patch: #12597

@staffik staffik requested review from wacban and Trisfald January 2, 2025 14:53
@staffik staffik requested a review from a team as a code owner January 2, 2025 14:53
Copy link
Contributor

@Trisfald Trisfald left a comment

Choose a reason for hiding this comment

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

LGTM

@staffik staffik requested a review from Trisfald January 2, 2025 17:31
Copy link
Contributor

@Trisfald Trisfald left a comment

Choose a reason for hiding this comment

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

LGTM

@staffik staffik added this pull request to the merge queue Jan 2, 2025
Merged via the queue into master with commit 5749548 Jan 2, 2025
22 of 23 checks passed
@staffik staffik deleted the stafik/resharding/alexpatch branch January 2, 2025 21:27
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.

2 participants