Refactor connection handling and add SQL compatibility tests#435
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #435 +/- ##
=======================================
Coverage 65.46% 65.47%
=======================================
Files 351 351
Lines 69730 69730
=======================================
+ Hits 45652 45656 +4
+ Misses 19228 19226 -2
+ Partials 4850 4848 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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 refactors database connection handling across the server codebase to centralize and standardize the use of pooled connections. The changes replace previous ad-hoc or context-specific connection acquisition with a new
getPoolConnhelper function, improving maintainability and consistency. Additionally, a new parallel HTTP query benchmark is introduced, and minor improvements are made to resource management.Database Connection Refactoring:
getPoolConnhelper function inserver.goto encapsulate pooled connection acquisition and wrapping, replacing repetitive connection logic throughout the codebase.http_query.go,http_write.go,mqtt_query.go) to usegetPoolConninstead of previous connection methods, ensuring consistent pooled connection usage and error handling. [1] [2] [3] [4] [5]Benchmarking and Resource Management:
BenchmarkHTTPQueryParallelbenchmark inhttp_test.goto measure parallel HTTP query performance under different database pool settings, aiding performance analysis and tuning.Dependency Update:
github.com/machbase/neo-clientdependency ingo.modto a newer commit.