fix(hub): generous read-pool FD cap + safe rows.Close defer-conversion (#79)#292
Merged
physercoe merged 1 commit intoJun 14, 2026
Merged
Conversation
#79) Part A: add SetMaxOpenConns(maxReadConns()) to all reader pools — s.db and per-team eventsR/digestR via openStorePool. Default 64, overridable via HUB_DB_MAX_READ_CONNS. Writer pools unchanged. Part B: convert 7 single-query manual rows.Close() sites to defer. Leave all loop-body and multi-query closes alone. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
physercoe
pushed a commit
that referenced
this pull request
Jun 14, 2026
Hub robustness sweep (#74–#79) + Projects-tab segmented sub-tabs. - ADR-045 D4 storage maintenance (#288) - raw-SQL-error no-leak sweep (#280/#283), rows.Err audit (#286), FTS/routing status codes (#287), owner-or-steward gate (#281), read-pool cap + rows.Close defer (#292), additive pagination (#293) - segmented Projects | Workspaces tabs (#289) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Closes #290
Part A — generous read-pool FD safety cap
maxReadConns()helper (default 64, overridable viaHUB_DB_MAX_READ_CONNS)SetMaxOpenConns(maxReadConns())+SetMaxIdleConns(maxReadConns())to:s.db— the control reader pool (server.go)eventsRanddigestRreader pools (openStorePoolreader branch instore_split.go)server.gostruct field, comment block,db.go,store_split.go)SetMaxOpenConns(1))Part B — safe rows.Close defer-conversion
Converted 7 single-query sites to
defer rows.Close():handlers_admin_teams.gohandleAdminRotateTeamTokenhandlers_insights.gofillInsightsByProject1st queryhandlers_criteria.gocascadeDeliverableRatifiedphase_completion_gate.gocascadeDeliverableUnratifiedseed_demo_lifecycle.goResetLifecycleDemoloop_hooks.goonPreAgentIdleloop_sweep.gobumpLoopProgressLeft all loop-body and multi-query manual closes alone (per spec trap).
Verify
All pass.
gofmt -wclean.🤖 Generated with Claude Code