fix(data-api): widen accounts-summary route's statement_timeout to 10s#8155
Merged
Conversation
Confirmed live: even with the ORDER BY/index fix (#8154), this route's two hotkey/coldkey scans still tripped the shared 3000ms default under real concurrent load. The sibling /accounts/:ss58/events route hit this same class of problem first and already widens its own budget -- same fix, ported here.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8155 +/- ##
=======================================
Coverage 97.82% 97.82%
=======================================
Files 415 415
Lines 28892 28893 +1
Branches 10850 10850
=======================================
+ Hits 28264 28265 +1
Misses 141 141
Partials 487 487
🚀 New features to boost your workflow:
|
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /api/v1/accounts/:ss58was still trippingcanceling statement due to statement timeoutafter fix(postgres): correct account_events index shape + safety-scan wording #8154's index fix — the query plan is correct now (no Sort, both new indexes used), but the route's two sequential hotkey/coldkey scans across account_events' 87 chunks still occasionally exceed the dispatcher's shared 3000ms default under real concurrent load./api/v1/accounts/:ss58/eventsroute hit this exact class of problem first and already carries its ownSET LOCAL statement_timeout = '10000ms'override rather than raising the global default for every other, lighter route. Ports that same override to the summary route.Test plan
npx vitest run tests/data-api.test.ts— 543/543 pass (4 tests updated for the new SET LOCAL call in the mock queue)npx tsc --noEmit— clean (pre-existing unrelated codegen errors only)npx tsx scripts/scan-public-safety.ts— passednpx prettier --check— clean