Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(tests): remove sync_empty_state #12473

Merged
merged 4 commits into from
Nov 18, 2024

Conversation

marcelo-gonzalez
Copy link
Contributor

This test can fail with nightly features and block PR merges: https://nayduck.nearone.org/#/test/231517. The reason it fails is that it sets up a node with a real rocksdb database in a temp dir, and creating snapshots actually takes several seconds even with small state because this loop takes a while. So the node trying to state sync can't request parts from the other node because it doesn't have a snapshot yet, and it doesn't retry its request until long after the current epoch is over and the other node has already deleted that snapshot. The fact that that loop in create_checkpoint() takes so long is something that perhaps we could look into, but it's not an issue in practice with long epoch lengths, so it's not a super high priority thing that should be causing test failures.

Fix it by just deleting that test and modifying the test loop state sync test to get the same conditions where we have fewer accounts than shards so that one of them is empty. (Although it should be noted that with nightly features, the state won't actually be empty since there'll be BandwidthSchedulerState data in the shards without accounts)

@marcelo-gonzalez
Copy link
Contributor Author

Not doing it here, but I think prob all of those tests in that file can be deleted in favor of testloop

Copy link
Member

@Longarithm Longarithm left a comment

Choose a reason for hiding this comment

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

Nice

@marcelo-gonzalez marcelo-gonzalez added this pull request to the merge queue Nov 18, 2024
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.84%. Comparing base (1a3382c) to head (a1343b4).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12473      +/-   ##
==========================================
- Coverage   69.84%   69.84%   -0.01%     
==========================================
  Files         838      838              
  Lines      169385   169385              
  Branches   169385   169385              
==========================================
- Hits       118314   118313       -1     
- Misses      45819    45823       +4     
+ Partials     5252     5249       -3     
Flag Coverage Δ
backward-compatibility 0.16% <ø> (ø)
db-migration 0.16% <ø> (ø)
genesis-check 1.29% <ø> (ø)
linux 69.15% <ø> (-0.02%) ⬇️
linux-nightly 69.43% <ø> (-0.01%) ⬇️
macos 51.04% <ø> (+0.02%) ⬆️
pytests 1.60% <ø> (ø)
sanity-checks 1.40% <ø> (ø)
unittests 69.67% <ø> (-0.01%) ⬇️
upgradability 0.21% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Merged via the queue into near:master with commit 7dfdfb0 Nov 18, 2024
28 checks passed
@marcelo-gonzalez marcelo-gonzalez deleted the sync-empty-state branch November 18, 2024 16:11
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants