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

DL migrate DB. #17814

Merged
merged 8 commits into from
Apr 9, 2024
Merged

DL migrate DB. #17814

merged 8 commits into from
Apr 9, 2024

Conversation

fchirica
Copy link
Contributor

@fchirica fchirica commented Apr 2, 2024

Old DB constrains won't allow Status.PENDING_BATCH as a potential root status, due to this check:

status INTEGER NOT NULL CHECK(
 {" OR ".join(f"status == {status}" for status in Status)}
 ),

This PR introduces a one time migration which will update the check with Status.PENDING_BATCH as well

@fchirica fchirica added Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog DataLayer labels Apr 2, 2024
@fchirica fchirica marked this pull request as ready for review April 4, 2024 18:21
@fchirica fchirica requested a review from a team as a code owner April 4, 2024 18:21
@fchirica fchirica requested review from emlowe and altendky April 4, 2024 18:21
Copy link

Pull Request Test Coverage Report for Build 8558268682

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 82 of 83 (98.8%) changed or added relevant lines in 3 files are covered.
  • 32 unchanged lines in 11 files lost coverage.
  • Overall coverage decreased (-0.009%) to 90.952%

Changes Missing Coverage Covered Lines Changed/Added Lines %
chia/data_layer/data_store.py 19 20 95.0%
Files with Coverage Reduction New Missed Lines %
chia/rpc/rpc_server.py 1 89.0%
chia/wallet/wallet_node.py 1 88.42%
chia/data_layer/dl_wallet_store.py 1 95.74%
chia/timelord/timelord.py 2 73.67%
chia/full_node/weight_proof.py 2 90.88%
chia/data_layer/data_layer_wallet.py 2 91.1%
chia/util/streamable.py 3 98.51%
chia/_tests/core/util/test_lockfile.py 4 88.66%
chia/server/server.py 4 80.52%
chia/full_node/full_node.py 5 85.41%
Totals Coverage Status
Change from base Build 8526710801: -0.009%
Covered Lines: 98415
Relevant Lines: 108186

💛 - Coveralls

@emlowe
Copy link
Contributor

emlowe commented Apr 5, 2024

In my rather full "CADT" db, this migration took 192s (over 3 mins). Not sure if I have any better ideas...

chia/data_layer/data_store.py Outdated Show resolved Hide resolved
@fchirica fchirica changed the base branch from main to release/2.3.0 April 8, 2024 16:06
@emlowe
Copy link
Contributor

emlowe commented Apr 8, 2024

Let's add a small test for the raise Exception("Unknown version") error condition

@pmaslana pmaslana merged commit a441eb1 into release/2.3.0 Apr 9, 2024
772 checks passed
@pmaslana pmaslana deleted the fc.dl_migrate branch April 9, 2024 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DataLayer Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants