mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 19:59:54 -05:00
### Does this PR have any customer impact? no ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) refactoring ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) no ### Are you introducing any new config? If yes, do you have tests with and without them being set? no ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Refactor Rust gw to eliminate client terminology when it comes down to postgres connections 1. There were too many "clients" that in fact were nothing else than a postgres connection, either done by us (renamed to Connection type) or a raw connection from deadpool crate, so to make my further changes more readable I'm doing this refactoring as a required step 2. I've introduced a separate connection pool for auth requests as we had it combined before, so in case one connection pool is throttled the other conn pool works 3. Update dev utils such as rust analyzer to index over the oss project and update the git hooks 4. update ADO pipeline to include clippy and cargo fmt for OSS ---- #### AI description (iteration 1) #### PR Classification This pull request is a refactoring update that replaces “client” terminology with “connection” to implement global postgres connection pooling in the Rust gateway. #### PR Summary The changes update naming and method calls to provide feature parity with a global postgres connection pool, standardizing connection handling across the codebase. - In files under `/oss/pg_documentdb_gw/src/processor/`, functions now use `Connection` and `pull_connection` instead of `Client` and `pg`, updating transactional and cursor operations accordingly. - In `/oss/pg_documentdb_gw/src/postgres/client.rs` and related modules, `Client` is renamed to `Connection` and `Pool` to `ConnectionPool` with adjusted internal method calls. - In `/oss/pg_documentdb_gw/src/context/`, connection acquisition functions and error messages are updated to reflect the new connection terminology. - In `/gateway/native/src/main.rs` and `/gateway/native/tests/common/mod.rs`, the global connection pool instantiation is revised, and the file `dataapi.rs` is moved and renamed to `data_api.rs`. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #3666511