FOX-3833 - Connection pooling#51
Merged
Merged
Conversation
mob1970
approved these changes
May 4, 2026
adamgeorgeson
approved these changes
May 5, 2026
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.
This pull request introduces major improvements to MySQL connection pooling, updates documentation, and upgrades the development and test environments. The most significant change is the introduction of a robust, configurable connection pool implementation (
MysqlConnectionPool), with enhanced lifecycle management and monitoring support. TheConnectorclass is refactored to use this new pool, and the documentation is updated to reflect new pooling behaviors, configuration options, and metrics publishing features. Additionally, the development stack is modernized by upgrading Ruby and MySQL versions.MySQL Connection Pooling Enhancements
MysqlFramework::MysqlConnectionPoolclass implementing connection pooling using theconnection_poolgem, with support for pool sizing, timeouts, idle connection reaping, and connection sanitization before checkout. This enables robust, thread-safe pooling and automatic cleanup of idle connections. (lib/mysql_framework/mysql_connection_pool.rblib/mysql_framework/mysql_connection_pool.rbR1-R176)MysqlFramework::Connectorto delegate all pooling logic to the new pool class, simplifying its methods and improving reliability for checking out, checking in, and using MySQL clients. (lib/mysql_framework/connector.rblib/mysql_framework/connector.rbR3-L123)Documentation Updates
README.mdto document all new pooling environment variables, updated usage examples for all connector methods, and added detailed warnings about thread-local connection reuse and sanitization. (README.md[1] [2] [3] [4]MysqlFramework::Stats::AwsMetricPublisherclass, which publishes pool metrics to AWS CloudWatch, and explained how to customize metric dimensions and namespace. (README.mdREADME.mdL283-R367)Development and Test Environment Modernization
.github/workflows/rspec.yml[1] [2];docker-compose.yml[3] [4]Gemfile, bumpingsimplecovto the latest version and adding thedebuggem for improved debugging during development and testing. (GemfileGemfileL10-R11)Other Notable Improvements
lib/mysql_framework/connector.rblib/mysql_framework/connector.rbR3-L123).github/workflows/rspec.yml.github/workflows/rspec.ymlL22-L37)