Files
documentdb/pg_documentdb_gw
Juan Carlos Aguilera Mendez fda71967a0 Merged PR 1708808: Allow OpQuery for Java driver 4.0.6
### Does this PR have any customer impact?

### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)

### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)

### Are you introducing any new config? If yes, do you have tests with and without them being set?

### ChangeLog (Refer [Template](../oss/CHANGELOG.md))

### Description

When using mongodb-driver-sync 4.0.6, and performing a query, the namespace in the request looks like "<db>.$cmd" compared to other version where it is "admin.$cmd". To accommodate this version, we just check if the collection name equals $cmd which is similar to what we do in the other Gateway

----
#### AI description  (iteration 1)
#### PR Classification
This PR implements an API update and bug fix to correctly handle OP_QUERY messages for Java driver 4.0.6.

#### PR Summary
The pull request refines the query parsing logic by extracting the collection name from the namespace instead of using the full collection path, ensuring that command queries are accurately identified and unsupported queries are logged.
- In `oss/pg_documentdb_gw/src/protocol/reader.rs`, the code now extracts a tuple (_db, collection_name) from the namespace.
- The condition to detect command messages is simplified to check if `collection_name` equals "$cmd".
- An informational log is added to print the collection name when OP_QUERY is unsupported.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
2025-06-19 14:10:04 +08:00
..