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

[Merged by Bors] - Don't set atx version in migration 18 #6011

Closed
wants to merge 3 commits into from

Conversation

poszu
Copy link
Contributor

@poszu poszu commented Jun 4, 2024

Motivation

Speedup the 18th migration of state the DB.

Description

The migration takes significant time because it sets version column for all existing ATXs and their number is so huge it takes ~30 minutes on fast computers (with nvme drive). Solely adding the column w/o a default value is instant.

This change changes the definition of types.AtxV1 from 1 to 0 so that we don't need to populate the column at all to have all existing ATXs be V1.

Test Plan

TODO

  • Explain motivation or link existing issue(s)
  • Test changes and document test plan
  • Update documentation as needed
  • Update changelog as needed

Copy link

codecov bot commented Jun 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.3%. Comparing base (7231d6e) to head (d8dbfed).

Additional details and impacted files
@@           Coverage Diff           @@
##           develop   #6011   +/-   ##
=======================================
  Coverage     81.2%   81.3%           
=======================================
  Files          296     296           
  Lines        31496   31498    +2     
=======================================
+ Hits         25606   25620   +14     
+ Misses        4215    4205   -10     
+ Partials      1675    1673    -2     

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

@poszu poszu marked this pull request as ready for review June 5, 2024 07:48
@poszu
Copy link
Contributor Author

poszu commented Jun 5, 2024

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Jun 5, 2024
## Motivation

Speedup the 18th migration of state the DB.
@spacemesh-bors
Copy link

spacemesh-bors bot commented Jun 5, 2024

Build failed:

  • ci-status

This reverts commit 08d6f07.
@poszu poszu requested a review from fasmat June 5, 2024 09:34
@fasmat
Copy link
Member

fasmat commented Jun 5, 2024

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Jun 5, 2024
## Motivation

Speedup the 18th migration of state the DB.
@spacemesh-bors
Copy link

spacemesh-bors bot commented Jun 5, 2024

Pull request successfully merged into develop.

Build succeeded:

@spacemesh-bors spacemesh-bors bot changed the title Don't set atx version in migration 18 [Merged by Bors] - Don't set atx version in migration 18 Jun 5, 2024
@spacemesh-bors spacemesh-bors bot closed this Jun 5, 2024
@spacemesh-bors spacemesh-bors bot deleted the speedup-migration-18 branch June 5, 2024 10:55
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.

None yet

2 participants