Skip to content

fix(datasources): retire pools cached under externally renamed codes - #81

Open
BigDataDZ wants to merge 1 commit into
xiaour:mainfrom
BigDataDZ:codex/oct27-pool-rename-cleanup
Open

BigDataDZ wants to merge 1 commit into
xiaour:mainfrom
BigDataDZ:codex/oct27-pool-rename-cleanup

Conversation

@BigDataDZ

@BigDataDZ BigDataDZ commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

When another server process renames a datasource code, the current process creates a pool under the new code but leaves the previous pool cached and open. Repeated renames accumulate connections until shutdown.

On a pool-cache miss, retire previous keys whose recorded datasource ID matches the current source before creating its replacement. Preserve unrelated datasource pools and the constant-time cache-hit path. Use the existing pool close/error-handling contract and weak connection snapshots; no baseline changes.

Validation: sync and async repeated-rename regressions fail before the change;59 lifecycle/disabled-source/dialect tests pass after it. Tests retain a second datasource pool and verify that old keys are removed, old pools close, and cache size stays bounded. Independent review/probes found no actionable issues. Based directly on main87c2966, which already includes #78.

中文:修复跨进程修改数据源代号后旧连接池遗留的问题,避免反复改名积累连接。

Full combined verification of#80–#82 on main87c2966:811 passed,5 failed,15 skipped; unchanged main794 passed,5 failed,15 skipped. The failing test names match exactly;17 new regression tests pass, with no new skips. Diagnostic runs use node --test --test-force-exit because existing failed tests retain resources. Architecture guard36 errors/2 warnings (baseline shape37 errors); fixture eval14/14 with2 L3 judge results pending. Baseline file unchanged. Combined branch codex/oct27-functional-fixes-integration at319fbbb; no upstream merge performed. CI is not claimed fully green.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant