Tags: axfor/documentdb
Tags
Merged PR 1775946: [RUM] Support unredacted log messages for diagnost… …ics in RUM ### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Logging ### 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 Port support for unredacted log messages in RUM ---- #### AI description (iteration 1) #### PR Classification This PR introduces a new feature to support unredacted log messages for improved diagnostics in RUM. #### PR Summary The pull request adds a custom logging hook and macro to output unredacted messages, enhancing diagnostic details in the RUM module. - `rumutil.c`: Added `PgmongoRumUnredactedLogEmitHook`, which formats log messages, sanitizes percent signs, and emits unredacted logs. - `rumvacuum.c`: Updated logging by replacing the standard `ereport` with the new `elog_rum_unredacted` macro for detailed vacuum diagnostics. - `rum.h`: Declared the new logging function and defined the `elog_rum_unredacted` macro with a specific SQL state code. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
Merged PR 1751683: [User-Experience] Enhancing error message experien… …ce for output stages ### 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 [User-Experience] Enhancing Merge error message experience for unsupported cases ---- #### AI description (iteration 1) #### PR Classification This pull request addresses a bug fix by enhancing the user experience for unsupported $merge stage scenarios with clearer error messages. #### PR Summary The changes introduce more specific error reporting when the $merge aggregation stage is used with mutable functions and unsupported stages, and update related test outputs accordingly. - `oss/pg_documentdb/src/aggregation/bson_aggregation_output_pipeline.c`: Added checks for specific function IDs (e.g., system_rows, random, and empty data table functions) and updated error messages for unsupported $merge with $sample and missing collections, as well as changing the return type of `ValidatePreOutputStages` from bool to void. - Test files under `oss/internal/pg_documentdb_distributed` and `pgmongo/src/test/docdb_compat`: Updated expected outputs to align with the revised error messages for unsupported aggregation scenarios. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
Merged PR 1713127: Provide the correct codeName on error and codegen … …for error codes and mapping ### 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 Added code generation to create all error codes off of shared csv definition files as well as the means to map an i64 to an error code. Also, if we have a known error code, fetch the proper error string, if exists, or None ---- #### AI description (iteration 1) #### PR Classification Bug fix to correctly convert error codes to text strings. #### PR Summary This pull request fixes the misassignment of error code and message, ensuring that error codes are properly converted to their text representation. - `src/responses/error.rs`: Reordered parameters in the `CommandError::new` call to swap the error code and message. - `src/responses/pg.rs`: Updated error handling to use `ErrorCode::from_i64` for converting error codes to text and added a dependency on `num_traits::FromPrimitive`. - `src/error.rs`: Added the `IndexNotFound` error variant with corresponding mapping in the `FromPrimitive` implementation. - `tests/test_search_tests.rs`: Introduced a test to validate that a text query fails with the expected "text index required for $text query" error message. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #4293767
DocumentDB 0.101-0 Release see change log for details: https://github.com/microsoft/documentdb/blob/main/CHANGELOG.md
Editing ReadMe to remove catalog schema reference (documentdb#12)