Skip to content

Tags: documentdb/documentdb

Tags

v0.109-0

Toggle v0.109-0's commit message
Merged PR 1899230: [Composite] Enable support for reduced composite t…

…erm generation

### 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

blah

----
#### AI description  (iteration 5)
#### PR Classification
This pull request introduces a new feature to enable reduced composite term generation for composite indexes, improving efficiency when handling correlated nested document terms.

#### PR Summary
The changes implement support for reduced composite term generation by updating the term generation logic, unique constraint checks, and query planning for composite indexes.
- Changes in files such as `src/opclass/bson_gin_composite_entrypoint.c`, `src/opclass/bson_gin_composite_core.c`, and related composite term generation files add support for reduced correlated term processing and update associated functions (e.g. handling of correlated term paths).
- New configuration flags—`enableCompositeReducedCorrelatedTerms`, `enableUniqueCompositeReducedCorrelatedTerms`, and `enableCompositeShardDocumentTerms`—are introduced in the feature flag configuration files to control the new behavior.
- The unique index generation logic in files like `src/commands/create_indexes.c` and `src/opclass/bson_gin_index_term.h` has been updated to pass an extra boolean flag (for composite term generation) to functions such as `generate_unique_shard_document`.
- SQL test files (e.g. `src/test/regress/sql/bson_composite_index_tests_multi_key.sql`) and regression outputs have been adjusted to validate unique constraint behavior and the new composite term outputs.
- Modifications in composite scan and option parsing (e.g. in `src/opclass/bson_gin_composite_scan.h`) ensure that secondary variable bounds and scan keys correctly handle the new reduced term semantics.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->

Signed-off-by: Shuai Tian <[email protected]>

v0.108-0

Toggle v0.108-0's commit message
Merged PR 1815453: [Composite] Support optimized elemMatch pushdown

### Does this PR have any customer impact?
Yes

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

### 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?
Yes

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

### Description

Improve pushdown of $elemMatch for composite indexes.

When there's an elemMatch of the form `{ "a": { "$elemMatch": { "$gt": 10, "$lt": 15 }}`
This can scan the index only from 10 -> 15

However given the multi-key index requirement we were doing 2 scans:
- One from 10 to infinity and the other from -infinity to 15.

Optimize this path for $elemMatch.

----
#### AI description  (iteration 1)
#### PR Classification
This PR introduces a new feature that optimizes the pushdown of `$elemMatch` queries for composite indexes.

#### PR Summary
The pull request implements optimized handling of `$elemMatch` predicates on composite indexes by converting them into specialized index pushdown expressions and updating the corresponding test expectations.
- **`oss/pg_documentdb/src/opclass/bson_gin_composite_core.c` & `index_support.c`**: Added logic to detect `$elemMatch` in range queries and convert them into optimized pushdown expressions (via functions like `GetElemMatchIndexPushdownOperator`).
- **Configuration Changes**: Introduced a new GUC (`documentdb.useNewElemMatchIndexOperatorOnPushdown`) in `pg_documentdb/src/configs/feature_flag_configs.c` to control the new behavior.
- **Test Updates**: Modified expected explain outputs in both `/oss/internal/pg_documentdb_distributed/src/test/regress/` and `/pgmongo/src/test/docdb_compat/expected/` to reflect the revised index condition format using `elemMatchIndexOp`.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->

Signed-off-by: Shuai Tian <[email protected]>

v0.107-0

Toggle v0.107-0's commit message
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 -->

v0.106-0

Toggle v0.106-0's commit message
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 -->

v0.105-0

Toggle v0.105-0's commit message
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

v0.104-0

Toggle v0.104-0's commit message
creating tag for 104 release

v0.103-0

Toggle v0.103-0's commit message
Release version 0.103-0

v0.102-0

Toggle v0.102-0's commit message
v0.102-0 release

v0.101-0

Toggle v0.101-0's commit message
DocumentDB 0.101-0 Release

see change log for details:
https://github.com/microsoft/documentdb/blob/main/CHANGELOG.md

v0.100-0

Toggle v0.100-0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Editing ReadMe to remove catalog schema reference (#12)