-
Notifications
You must be signed in to change notification settings - Fork 118
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
fix: use an independent sql connection for mempool stats #2217
Conversation
Vercel deployment URL: https://stacks-blockchain-6vfvfmmoj-hirosystems.vercel.app 🚀 |
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully this finally fixes the issues around this!
## [8.6.0-beta.2](v8.6.0-beta.1...v8.6.0-beta.2) (2025-02-06) ### Bug Fixes * use an independent sql connection for mempool stats ([#2217](#2217)) ([f8137e4](f8137e4))
🎉 This PR is included in version 8.6.0-beta.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [8.6.0](v8.5.0...v8.6.0) (2025-02-06) ### Features * consider tenure block fullness for transaction fee estimations ([#2203](#2203)) ([396e2ea](396e2ea)) * store total transaction size in blocks table ([#2204](#2204)) ([ac7c41b](ac7c41b)) ### Bug Fixes * make tx_total_size column nullable ([#2207](#2207)) ([77bd2f8](77bd2f8)) * use an independent sql connection for mempool stats ([#2217](#2217)) ([f8137e4](f8137e4))
🎉 This PR is included in version 8.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
confirmed i was able to reach chain tip using this branch, thanks! |
Previously, this debounced mempool stats calculator query was sharing a single sql connection with the pg writer. If the debounced trigger coincided with a new block ingestion, both tasks reused the same SQL transaction resulting in a race condition: as soon as the block ingestion ended, the mempool stats query was cut short because the transaction was committed. This resulted in a
CONNECTION_DESTROYED
postgres error as described here: stacks-network/stacks-core#5663This PR moves the mempool stats query to its own SQL connection