Skip to content

mysql - fix: isolate pooled connection lifecycles - #2012

Merged
jaredwray merged 3 commits into
mainfrom
agent/mysql-fix-pool-lifecycle
Jul 17, 2026
Merged

mysql - fix: isolate pooled connection lifecycles#2012
jaredwray merged 3 commits into
mainfrom
agent/mysql-fix-pool-lifecycle

Conversation

@jaredwray

@jaredwray jaredwray commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Please check if the PR fulfills these requirements

  • Followed the Contributing and Code of Conduct guidelines.
  • Tests for the changes have been added (for bug fixes/features) with 100% code coverage.

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
mysql - fix: isolate pooled connection lifecycles

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the MySQL storage adapter to use reference-counted connection pool leases, allowing adapters with identical configuration options to share a pool while ensuring pools are not prematurely closed when other adapters are still using them. Feedback was provided to address a potential memory leak in the pool options serialization logic by avoiding a global strong Map for symbol identities and instead serializing symbols using their description or string representation.

Comment thread storage/mysql/src/pool.ts Outdated
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (dc563b6) to head (4eb5e77).

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #2012      +/-   ##
===========================================
+ Coverage   99.95%   100.00%   +0.04%     
===========================================
  Files          55        55              
  Lines        4887      4896       +9     
  Branches      779       779              
===========================================
+ Hits         4885      4896      +11     
+ Misses          2         0       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7f9b84313f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread storage/mysql/src/index.ts Outdated
Comment thread storage/mysql/src/pool.ts Outdated
@jaredwray
jaredwray merged commit 86b61c8 into main Jul 17, 2026
13 checks passed
@jaredwray
jaredwray deleted the agent/mysql-fix-pool-lifecycle branch July 17, 2026 15:59
This was referenced Aug 3, 2026
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