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

sqlite cached_statements workaround #19114

Merged
merged 1 commit into from
Jan 9, 2025
Merged

sqlite cached_statements workaround #19114

merged 1 commit into from
Jan 9, 2025

Conversation

wjblanke
Copy link
Contributor

@wjblanke wjblanke commented Jan 9, 2025

Purpose:

Newer versions of python return incorrect sqlite results if cached_statements is nonzero. See:

python/cpython#118172

Current Behavior:

cached_statements is set to default

New Behavior:

cached_statements is set to 0. Chia rarely repeats the same sqlite queries so hopefully this does not affect performance.

Testing Notes:

None

@wjblanke wjblanke added the Changed Required label for PR that categorizes merge commit message as "Changed" for changelog label Jan 9, 2025
@wjblanke wjblanke requested a review from a team as a code owner January 9, 2025 04:54
@wjblanke wjblanke requested a review from arvidn January 9, 2025 04:57
@arvidn
Copy link
Contributor

arvidn commented Jan 9, 2025

Chia rarely repeats the same sqlite queries

I don't think this is true. Many of our queries are parameterized, and can be pre-compiled. I doubt this would have a noticeable performance impact though.

@wjblanke wjblanke merged commit 2509071 into main Jan 9, 2025
363 checks passed
@wjblanke wjblanke deleted the cachedstatementswjb branch January 9, 2025 13:41
Copy link

Pull Request Test Coverage Report for Build 12683861672

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 10 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.05%) to 91.563%

Files with Coverage Reduction New Missed Lines %
chia/wallet/wallet_node.py 1 88.03%
chia/farmer/farmer_api.py 2 94.38%
chia/full_node/full_node.py 7 86.49%
Totals Coverage Status
Change from base Build 12683809230: 0.05%
Covered Lines: 105356
Relevant Lines: 114889

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changed Required label for PR that categorizes merge commit message as "Changed" for changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants