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

test(resharding): add test case for state sync the epoch after resharding #12691

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marcelo-gonzalez
Copy link
Contributor

This adds a test that has an extra node that tracks an unrelated shard for both the pre and post resharding epochs, and then tracks a child in the next epoch after that. This hits the case where apply_state_part() called by the state sync code will set the state for the child, and no resharding code was involved. Here we also call check_state_shard_uid_mapping_after_resharding() for all clients, so that we can check this for the one we added.

The test is currently ignored because of MissingTrieValue errors in check_state_shard_uid_mapping_after_resharding(), plus an assertion in that function that checks that no child shards are directly stored in the state column, which won't be true for this state synced child shard.

@marcelo-gonzalez marcelo-gonzalez requested a review from a team as a code owner January 7, 2025 04:26
@marcelo-gonzalez
Copy link
Contributor Author

I assume the MissingTrieValue might be due to the same reason that there are TODOs here in check_state_shard_uid_mapping_after_resharding() and on top of other ignored tests? But even if you comment out the MissingTrieValue part (assert_eq!(&child_value.unwrap()[..], value.unwrap());), we'll get an error because of the missing state mapping:

thread 'test_loop::tests::resharding_v3::test_resharding_v3_sync_child' panicked at integration-tests/src/test_loop/utils/trie_sanity.rs:359:9:
assertion failed: !children_shard_uids.contains(&shard_uid)

@staffik
Copy link
Contributor

staffik commented Jan 7, 2025

I assume the MissingTrieValue might be due to the same reason that there are TODOs here in check_state_shard_uid_mapping_after_resharding() and on top of other ignored tests? But even if you comment out the MissingTrieValue part (assert_eq!(&child_value.unwrap()[..], value.unwrap());), we'll get an error because of the missing state mapping:

thread 'test_loop::tests::resharding_v3::test_resharding_v3_sync_child' panicked at integration-tests/src/test_loop/utils/trie_sanity.rs:359:9:
assertion failed: !children_shard_uids.contains(&shard_uid)

check_state_shard_uid_mapping_after_resharding asserts that both children state is available, which would not be the case here because we only state sync to one child. So this check should not be applied in this test, or should be modified. Let me look into this today.

Looks like the base test test_resharding_v3 is not passing too, so probably all tests.

@marcelo-gonzalez
Copy link
Contributor Author

Looks like the base test test_resharding_v3 is not passing too, so probably all tests.

Ahh yea whoops, somehow I just forgot to check whether it would break the other ones before sending the PR, but yeah maybe we can leave this PR around until we figure out if it's a real failure

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