Commit Graph
251 Commits
Author SHA1 Message Date
gledis69 bf5fa8a4cb Split the script steps in order to find where the issue is 2024-08-16 18:24:09 +03:00
gledis69 06e0c08826 Add debug step 2024-08-16 18:24:09 +03:00
gledis69 c26840d9b0 Try making sudo non interactive for the scripts 2024-08-16 18:24:09 +03:00
gledis69 59bed7d6d9 Try specifying shell 2024-08-16 18:24:09 +03:00
gledis69 285ad323bf Fix workflow syntax 2024-08-16 18:24:09 +03:00
gledis69 d63eb10749 Run sql tests without caching container 2024-08-16 18:24:09 +03:00
Gledis Zeneli f425a7f946 Fix internal compatibility test (#38)
Make fixes and improvements to the internal compatibility test
2024-08-14 01:31:50 +03:00
Rajesh Kumar Thandapani 24704eb978 Merged PR 1409491: Change Stream implementation with Direct WAL decoding (without replication slots)
### Does this PR have any customer impact?
 Yes, it provides support for $changeStream pipeline stage for creating change stream cursor and consuming events from it.

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

### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Adds a new UDF for change_stream_aggregation

### Are you introducing any new config? If yes, do you have tests with and without them being set?
Adds a GUC for enabling ChangeStreams freature and tests have been added to test the feature. It is disabled by default.

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
../docs/pgmongo/design_docs/data_plane/change_streams/change_stream_release_notes.md

### Description

This PR implements the change stream tailing cursors using the direct WAL decoding. It avoids using replications slots for logical decoding because of the constraints in creating and decoding with replication slots.

Related work items: #2973720
2024-07-31 17:09:22 +03:00
Vinod Sridharan 09b8db5c20 Merged PR 1417360: [Gateway] Add prepare for Find/Insert and some internal error fixes
### Does this PR have any customer impact?
No

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

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

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
Support prepare for operations that have fixed args with feature flag off

----
#### AI description  (iteration 1)
#### PR Classification
New feature

#### PR Summary
This pull request introduces a new configuration option to skip the preparation of requests in the Postgres Mongo service.
- Added `SkipPrepare` property in `PostgresTenantConfiguration.cs` to read the new configuration.
- Updated `PostgresMongoRequestHandler.cs` to pass the `skipPrepare` flag to `PostgresRequestOptions`.
- Modified `PostgresRequestOptions.cs` to include the `SkipPrepare` flag.
- Added `pgmongo.skipPrepare` configuration in `pgmongo.c`.
- Updated `PostgresClient.cs` to conditionally call `PrepareAsync` based on the `SkipPrepare` flag.
2024-07-31 17:09:22 +03:00
Jia Hu 👻 1349f83b04 Merged PR 1409558: support DBRef in match
### 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?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

support DBRef in match

----
#### AI description  (iteration 1)
#### PR Classification
New feature

#### PR Summary
This pull request adds support for handling DBRef objects in query matching.
- `src/query/query_operator.c`: Added `CreateQualsForDBRef` function to handle DBRef fields (`$ref`, `$id`, `$db`) in queries.
- Modified `CreateQualsFromQueryDocIteratorInternal` to integrate the new DBRef handling logic.
2024-07-31 17:09:22 +03:00
Vinod Sridharan 48020446af Merged PR 1415642: [Perf] Enable Cross Rum Index joins
### Does this PR have any customer impact?
No

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

### 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 (Feature flag for scan perf)

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
Enables joining across multiple RUM indexes for bitmap scans (so that the user doesn't need to create a single composite index for performance).

----
#### AI description  (iteration 1)
#### PR Classification
Performance improvement

#### PR Summary
This pull request introduces optimized cross RUM index joins to enhance query performance.
- Added `rum_custom_join_scan.c` to implement custom scan logic for RUM index joins.
- Updated `rumget.c` to include `multiandgetbitmap` function for handling multiple index scans.
- Modified `custom_scan_continuation.c` to integrate custom scan paths and optimize query plans.
2024-07-31 17:09:22 +03:00
Vinod Sridharan f64558301b Merged PR 1411883: [Lookup with Let] Fix up some JStests for lookup with Let and misc lookup fixes
### 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)
Yes

### Are you introducing any new config? If yes, do you have tests with and without them being set?
Yes and Yes
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
- Fix up bugs with $lookup with Let by rewriting lookup to be let friendly
- Get through jstests having lookup with let
-  Optimize Lookup where hte left and right both are on _id to support joins directly on object_id
- Allow the lookup pipeline to be split as "inlined" and "non-inlined" and allow pushing up the inlined pipeline
- Fix bugs with facet/graphlookup arising from Lookup with let tests
- Allow inlining the $unwind path after a $lookup if the $unwind matches a $lookup as (behind a feature flag)
2024-07-31 17:09:22 +03:00
Vinod Sridharan eec62ebaf1 Merged PR 1416261: Index truncation fix for nested document/array
### 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?

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

Index truncation

----
#### AI description  (iteration 1)
#### PR Classification
Bug fix to address incorrect data size calculation in index truncation.

#### PR Summary
This pull request corrects the data size calculation in the `TruncateNestedEntry` function to ensure accurate index truncation.
- `src/opclass/gin_index_term.c`: Adjusted `dataSize` calculation by adding `currentLength` to the base value.
2024-07-31 17:09:22 +03:00
Xing Fan ⛳ e0cf07eef0 Merged PR 1411264: Fix corner case for $getField
### Does this PR have any customer impact?
No

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

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

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

Previous implementation didn't handle null input for doc in pipeline. For example, previous behavior:
![image (2).png](https://msdata.visualstudio.com/ba574a88-a171-48e0-8fcb-5fef6d23739c/_apis/git/repositories/501a5e7e-ffdc-4d1e-a5e6-910f73c6eb9a/pullRequests/1411264/attachments/image%20%282%29.png)
The return value for the first document should be null instead of `missing`. Fixed behavior like:
![image.png](https://msdata.visualstudio.com/ba574a88-a171-48e0-8fcb-5fef6d23739c/_apis/git/repositories/501a5e7e-ffdc-4d1e-a5e6-910f73c6eb9a/pullRequests/1411264/attachments/image.png)

Related test cases are added
2024-07-31 17:09:22 +03:00
Deepak Pemmaraju 6d0a958d18 Merged PR 1370910: Setting right permissions when creating a collection, changing Gateway error codes and adding gateway tests
### 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?

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
2024-07-31 17:09:22 +03:00
Jayanta Mondal 5fda77b083 Merged PR 1406384: [engine] Index term truncation for Arrays of Objects/Arrays and Objects of Objects/Arrays
### Does this PR have any customer impact?
Yes

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

### 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, yes.

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

1. Supporting index term truncation for for nested objects (like arrays/objects or arrays/objects)
2. Fixing a release blocker bug that created wrong index term for single key wildcard index.

----
#### AI description  (iteration 1)
#### PR Classification
New feature: Index term truncation for nested arrays and objects in BSON documents.

#### PR Summary
This pull request introduces functionality to truncate index terms for arrays of objects and nested objects/arrays in BSON documents to adhere to size limits.
- `oss/pg_helio_api/src/opclass/gin_index_term.c`: Added logic to handle truncation for `BSON_TYPE_DOCUMENT` and `BSON_TYPE_ARRAY` with specific size limits.
- `oss/pg_helio_core/src/io/pgbson.c`: Enhanced error messages to include specific BSON value types when values are too large to append.
2024-07-31 17:09:22 +03:00
Ayush Saluja 102ba2a717 Merged PR 1397545: bugfix for regex option validation
### Does this PR have any customer impact?

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

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

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
bugfix for regex option validation

During $regex input spec we were not validating the options input by the user.
As per the jstest we need to throw error on invalid options.
hence, fixing that

Related work items: #1943161, #3335215
2024-07-31 17:09:22 +03:00
Xing Fan ⛳ 02ccfae470 Merged PR 1401106: Implement $getField
### Does this PR have any customer impact?
No

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

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

MongoDB doc:
https://www.mongodb.com/docs/manual/reference/operator/aggregation/getField/
2024-07-31 17:09:22 +03:00
Vinod Sridharan f7c1027740 Merged PR 1409079: [Pgmongo] Misc Gateway changes
### Does this PR have any customer impact?
Yes

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

### 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
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

1) Don't retry writes on replica clusterss
2) Don't allow $indexStats in transactions
3) Abort transaction on query failures (matches mongo/PG behavior)
4) Remove EnableExperimentalMultiCoordinator in GW, and remove old Version Greater checks.

----
#### AI description  (iteration 1)
#### PR Classification
Code enhancement and new feature implementation.

#### PR Summary
This pull request introduces several enhancements and new features related to read replica handling and transaction management in the MongoDB Postgres integration.
- `ReadReplicaTests.cs`: Added integration tests to verify that writes to read replicas fail as expected.
- `ExtensionVersionExtensions.cs`: Removed version checks for deprecated backend versions.
- `PostgresTenantConfiguration.cs`: Added properties to handle read replica configurations.
- `PostgresMongoResultExtensions.cs`: Enhanced error handling for read-only transactions and replica clusters.
- `PostgresClient.cs`: Simplified index creation and dropping logic by removing multi-coordinator support.
2024-07-31 17:09:22 +03:00
Parag Jain 0f0799eefa Merged PR 1407506: Support for Multiple variable in Let Lookup
### 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?

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
Support for Multiple variable in Let Lookup

----
#### AI description  (iteration 1)
#### PR Classification
New feature: Support for multiple variables in `$lookup` stage of aggregation pipelines.

#### PR Summary
This pull request adds support for using multiple variables in the `$lookup` stage of MongoDB aggregation pipelines, enhancing query capabilities.
- `postgresjs/merge_stage_cx_scenario.js`: Added a new pipeline to test multiple variable support in `$lookup`.
- `bson_aggregation_pipeline_tests_let.out` and `bson_aggregation_pipeline_tests_let.sql`: Added test cases for multiple variable support in `$lookup`.
- `bson_aggregation_nested_pipeline.c`: Modified to handle multiple variables in `$lookup` and updated related functions.
- `LookupTests.cs`: Updated integration tests to validate the new feature and added setup/cleanup configurations.
- `utils.sh`: Enabled configuration settings for `let` support in aggregation stages.
2024-07-31 17:09:22 +03:00
Vinod Sridharan 93b624f560 Merged PR 1407663: Remove Citus 11 tests in main
### Does this PR have any customer impact?
No

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

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

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
The last Citus 11 cluster was upgraded before July 5th. The next train therefore can go out with Just citus 12 support. Remove Citus 11 from the test matrix for jstests
2024-07-31 17:09:22 +03:00
Duan Pei✨ b892953b57 Merged PR 1398465: [Fix] ttl_index_expireAfterSeconds
### 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?

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
It will cause a jstest to fail.

jstest dev-container path: /home/cosmosdev/.nuget/packages/mongodb60.tests.internal.xcopy/1.0.2/content/6.0.5/jstests/core/ttl_index_options.js 25 line.

In Atlas, when creating a TTL index, if the input expireAfterSeconds is a floating point number, it will successfully create the index and only keep the integer part.

So there is no need to check whether the input expireAfterSeconds is a floating point number.
![image.png](https://msdata.visualstudio.com/ba574a88-a171-48e0-8fcb-5fef6d23739c/_apis/git/repositories/501a5e7e-ffdc-4d1e-a5e6-910f73c6eb9a/pullRequests/1398465/attachments/image.png)
2024-07-31 17:09:22 +03:00
Manish Gaur 65380e5677 Merged PR 1404339: pgmongo version update for 1.19 release - Round 2
### 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?

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

pgmongo version update for 1.19 release - Round 2
2024-07-31 17:09:22 +03:00
Ayush Saluja 772bc012a9 Merged PR 1398717: bugfix remove ntoreturn support as an option
### Does this PR have any customer impact?

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

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

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
For release we might need to discuss as there can be clients which are using this option.

### Description
This aims to fix the jstest  "jstests/core/find_with_ntoreturn_fails.js"
This test states the option ntoreturn is not supported since mongo version>=5.1

hence, removing support

Related work items: #3336041
2024-07-31 17:09:22 +03:00
Vinod Sridharan a07d441a46 Merged PR 1404201: [Lookup with Let] Plumb in the code for let with $lookup
### Does this PR have any customer impact?
No

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

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
 Plumb in the code for let with $lookup behind a feature flag
2024-07-31 17:09:22 +03:00
Shuai Tian 🚀 b714614a5a Merged PR 1398510: [bugfix] correct behavior when $push is missing $each but has other modifiers to make 1 jstest pass
### Does this PR have any customer impact?
No

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

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

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

when $push is missing 'each' but has other modifiers('position', 'slice', 'sort'), $push should treat those as plain fields and add to the specified array.
2024-07-31 17:09:22 +03:00
Vinod Sridharan c4ed06beeb Merged PR 1402545: [Let] Support let in all remaining stages except $lookup
### Does this PR have any customer impact?
Not yet

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

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

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

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
Support remaining aggregation stages except $lookup and $mergeObjects on sorted with $group.
2024-07-31 17:09:22 +03:00
Vinod Sridharan 3cbc0e0037 Merged PR 1400815: [Let support] Add support for let in more stages
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Features
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Yes
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
n/a
### Description
Add support for let in
- $sortByCount
- $group (partial)
- $addFields
- $project
- $facet
- $unionWith
- $graphLookup
- $project
2024-07-31 17:09:22 +03:00
Gledis Zeneli e5f329f898 Add CODEOWNERS (#37)
Add CODEOWNERS
2024-07-30 17:28:06 +03:00
Gledis Zeneli 6a8fc8e4dd Setup internal repo sync (#35)
Sets up syncing branches to internal repo for all new created branches
based on main.
* handles syncing new branches
* multiple commits
* syncing branches that were force pushed
* merge conflicts
2024-07-29 17:21:12 +03:00
Deepak Bisht 91b9946227 Merged PR 1383926: setWindowFields aggregation stage
### Does this PR have any customer impact?
No

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

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

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

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
- Support for `$setWindowFields` aggregation pipeline stage

### Description
This PR adds the support for `$setWindowFields` aggregation stage using the Postgres `Window aggregation` operators.

For the first PR it only adds support with `$sum` aggregation operator.
Next set of PRs will individually support all the other window aggregation operators supported by `$setWindowFields` stage.

[TODO] Currently $sum is used as is (the way $group uses it), there is way to optimize this using the `Inverse Transition` functions for Window aggregation which modifies the aggregated state in a way to accomodate rows leaving the group in a moving window, which will be done later (this is done to make review on smaller set of files)

Related work items: #2272584
2024-07-11 17:56:53 +03:00
Vinod Sridharan 65a0cf4a46 Merged PR 1399519: Let support: Part 1: Add support for let in find/aggregate
### Does this PR have any customer impact?
No

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

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

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

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
Add support for `let` in `find` and `aggregate`
- For find ensure that let can be supported both in projection and query.
- For aggregate, so far this is only supported in `$match`.

In subsequent PRs other stages will be reviewed and modified.

Note that this is a precursor to $lookup with let since Lookup's inner pipeline can reference any of those stages that can use `let`

Since this is a partial feature this is guarded with a feature flag.
2024-07-11 17:56:53 +03:00
Vinod Sridharan 5dbc8843d4 Merged PR 1398308: [Colocation] Support colocation with Transaction isolation
### Does this PR have any customer impact?
No

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

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
- If we have 2 concurrent tables being created in 1 DB then they get colocated in 2 different groups.
- Prevent this by using a common table per db (system.dbSentinel).
2024-07-11 17:56:53 +03:00
Parag Jain 0922eac1d7 Merged PR 1391214: [Feature] support for $merge aggregation stage part -2
### Does this PR have any customer impact?
No

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

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

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
support of `merge` Action in case of `whenMatched` in `$merge` aggregation stage.

Related work items: #1827100
2024-07-11 17:56:53 +03:00
Shuai Tian 🚀 b3a934c5a4 Merged PR 1397255: disallow dots in group output field names to make one jstest pass
### Does this PR have any customer impact?
No

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

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

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

disallow dots in group output field names, to make this test pssed: jstests\aggregation\bugs\server6198.js
2024-07-11 17:56:53 +03:00
Parag Jain 3869e5ae56 Merged PR 1395986: Adding a GUC for support for $Merge across DB.
### 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?

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
Adding a GUC for support for merge across DB.

After Latest colocation changes : https://msdata.visualstudio.com/CosmosDB/_git/pgmongo/pullrequest/1394549

For unsharded collections, if the source and target tables are in different databases, they will not be colocated. Additionally, unsharded collections no longer use HASH_DISTRIBUTION. As a result, Citus does not support the repartitioning strategy and the operation fails.

Currently, cross-database support is available under GUC until we have a fix in Citus.
2024-07-11 17:56:53 +03:00
Ujjwal Agrawal 235df34099 Merged PR 1371362: add 2d index bounds validation
### 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?

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

Add check that the geoNear query's reference point is within the geo bounds added in the index

Related work items: #3263902
2024-07-11 17:56:53 +03:00
Ayush Saluja 66d1e7a0c0 Merged PR 1395909: [pgmongo] bugfix for max pipeline depth jstest pass $unionWith and $lookup
### Does this PR have any customer impact?
yes

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

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

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

For the bugbash found that we need to fix max depth for $lookup and $unionWith stages.
Enabled the jstest for the same
2024-07-11 17:56:53 +03:00
gledis69 a855fe305a Silly commit for testing 2024-07-11 14:53:41 +03:00
gledis69 29392a3880 Add internal compatibility test 2024-07-11 14:53:41 +03:00
Vinod Sridharan fb71d32668 Merged PR 1394549: Take 2: Fixes with colocation and Citus 12
### 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?

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

Take 2: Fixes with colocation and Citus 12
2024-07-05 13:16:04 +03:00
Deepak Bisht 5cb7bf4ca5 Merged PR 1394849: Geospatial Internal self intersection errors for $polygon
### Does this PR have any customer impact?
Yes

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

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

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
- Bugfix with $polygon self intersecting geometry

### Description
MongoDB is not restrictive when the 2d polygon is created using `$polygon`

Here the polygon defined by `$polygon` is not a valid polygon as it intersects with itself
`[[10, 10], [10, 12], [11, 11], [9, 11]]`

![image.png](https://msdata.visualstudio.com/ba574a88-a171-48e0-8fcb-5fef6d23739c/_apis/git/repositories/501a5e7e-ffdc-4d1e-a5e6-910f73c6eb9a/pullRequests/1394849/attachments/image.png)

But similar query in Postgis would not work and we can always make them valid using ST_makevalid:
![image (2).png](https://msdata.visualstudio.com/ba574a88-a171-48e0-8fcb-5fef6d23739c/_apis/git/repositories/501a5e7e-ffdc-4d1e-a5e6-910f73c6eb9a/pullRequests/1394849/attachments/image%20%282%29.png)
2024-07-05 13:16:04 +03:00
Shuai Tian 🚀 4eb63103f3 Merged PR 1359786: Add $bucket stage doc and implementation
### 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?

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
Add bucket aggregation stage

Query time comparison for $bucket between Atlas and vCore:
https://microsoftapc-my.sharepoint.com/❌/g/personal/shuaitian_microsoft_com/EduvH4BY2O9Dnt92siIPJlUBOF5DNKNeF4BSQ6NeyZO-iQ?e=xGAuIC

Related work items: #1798584
2024-07-05 13:16:04 +03:00
Parag Jain 9d7187e746 Merged PR 1394555: [Fixes] memory allocation and free related fixes PCRE2
### 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?

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
This PR has fix :
1. use palloc and pfree for match context by passing general context which knows about custom functions.

![image (3).png](https://msdata.visualstudio.com/ba574a88-a171-48e0-8fcb-5fef6d23739c/_apis/git/repositories/501a5e7e-ffdc-4d1e-a5e6-910f73c6eb9a/pullRequests/1394555/attachments/image%20%283%29.png)
2024-07-05 13:16:04 +03:00
Vinod Sridharan 70057eff24 Merged PR 1395389: Colocation, Merge & Update changes
### 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?

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
- DIsable Colocation by default in utils.sh until we have citus single shard distributed table support for merge.
- Fix Citus 12.1 usage in the pipelines
- Enable update unsharded optimization by default.
2024-07-05 13:16:04 +03:00
Santiago Fernandez Madero 017d302a57 Merged PR 1319595: inverseMatch: Support specifying a from collection to avoid the need of a lookup
This PR adds support to specify a from collection within the same database in an inverseMatch aggregation stage.

The spec is as follows:

```
{"$inverseMatch": {"path": <path>, "from": <collection>, "pipeline": <[match | project | limit]> }}
```

Where the input to the inverseMatch evaluation is the result of running the aggregation pipeline against the given collection.
2024-07-05 13:16:04 +03:00
Ujjwal Agrawal 5d50087869 Merged PR 1387494: Geospatial code cleanup
### 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
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

geospatial code cleanup
2024-07-05 13:16:04 +03:00
Vinod Sridharan 204950f55c Merged PR 1391279: [Unique] Unique error constraint should have the Index name in the error
### Does this PR have any customer impact?
No

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

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

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
Unique error constraint should have the Index name in the error
2024-07-05 13:16:04 +03:00
Jia Hu 👻 36e84429da Merged PR 1387090: Schema validation wave 1 - fix and add feature flag
### 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?

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

Add feature flag for schema validation.

Related work items: #3296102
2024-07-05 13:16:04 +03:00
Vinod Sridharan f4ce1f8ae2 Merged PR 1390611: [Background Worker] Spin up background worker behind a feature flag
### Does this PR have any customer impact?
No

### 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 - feature flags
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
Create background worker stub - this worker does nothing other than sleep.
Only turn this on behind a feature flag and enable it for backend tests only.
2024-07-05 13:16:04 +03:00