Commit Graph
271 Commits
Author SHA1 Message Date
Manish Gaur 2fff0dca08 Merged PR 1424268: Version update to start pgmongo 1.20 release
### 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

Version update to start pgmongo 1.20 release

----
#### AI description  (iteration 1)
#### PR Classification
Version update

#### PR Summary
This pull request updates the version numbers and adds release notes for the pgmongo 1.20 release.
- Added release notes in `docs/release_notes/pgmongo_1.21.md`
- Updated version numbers in `pg_helio_api.control`, `pg_helio_core.control`, and `pgmongo.control`
- Added SQL migration scripts for version updates in `pg_helio_api`, `pg_helio_core`, and `pgmongo`
- Updated table of contents in `docs/release_notes/toc.yml`
- Updated SHA1 checksums for SQL scripts in `pgmongo/sql/sha1`
2024-08-16 18:24:51 +03:00
Deepak Bisht b08ac5b39e Merged PR 1402307: Support $avg and $push in $setWindowFields stage with inverse transition
### 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))
- Add support for $avg, $push in $setWindowFields stage.
- Add inverse transition functions for $sum, $avg, $push

### Description
Add the inverse transition function for $sum, $avg and $push for optimal window aggregation.

Also for `$push` it is not currently usable in windowing because of its specific state requirement, need to add another state for window operation for `$push`
2024-08-16 18:24:51 +03:00
Xiaochun Liang 622d392bf2 Merged PR 1376029: stdDevPop and stdDevSamp accumulator for group by aggregation
### 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
Implementation of $stdDevPop and $stdDevSamp accumulators.

Reference:
[stdDevPop](https://www.mongodb.com/docs/manual/reference/operator/aggregation/stdDevPop/)
[stdDevSamp](https://www.mongodb.com/docs/manual/reference/operator/aggregation/stdDevSamp/)

Related work items: #3277074
2024-08-16 18:24:51 +03:00
Vinod Sridharan 97ec6b9a9e Merged PR 1423159: Internal error fix and correct feature flag
### 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?
Yes

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

### Description
- Implement READ for some scan types to avoid internal errors
- Move feature flag for local shard use to the local shard use feature flag.

----
#### AI description  (iteration 1)
#### PR Classification
Bug fix and feature flag correction.

#### PR Summary
This pull request addresses an internal error and corrects the usage of a feature flag.
- `custom_scan_continuation.c`: Added functions for reading and writing custom scan nodes, replacing unsupported functions.
- `rum_custom_join_scan.c`: Added functions for reading and writing custom join scan nodes, replacing unsupported functions.
- `api_hook_impl.c`: Corrected feature flag usage from `EnableNativeColocation` to `UseLocalExecutionShardQueries`.
- `custom_query_scan.c`: Updated error messages for unsupported node types to be more specific.
2024-08-16 18:24:51 +03:00
Vinod Sridharan c9e638208a Merged PR 1420391: Multinode & Multi-region improvements
### 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

Multinode improvements: Better diagnostics on sharding:
- This shows each data bearing node as a "shard_##"
- It shows each sharded table and what nodes the shards are on.
- Shows the rebalancer as off and auto-split as off
![image.png](https://msdata.visualstudio.com/ba574a88-a171-48e0-8fcb-5fef6d23739c/_apis/git/repositories/501a5e7e-ffdc-4d1e-a5e6-910f73c6eb9a/pullRequests/1420391/attachments/image.png)

Introduces the chunks table where we can report chunks and sizes:
![image (2).png](https://msdata.visualstudio.com/ba574a88-a171-48e0-8fcb-5fef6d23739c/_apis/git/repositories/501a5e7e-ffdc-4d1e-a5e6-910f73c6eb9a/pullRequests/1420391/attachments/image%20%282%29.png)

- This will also report sizes of each chunks so you can run aggregate queries to get size per node, size per table etc.
----
#### AI description  (iteration 1)
#### PR Classification
Enhancement for multinode and multi-region support.

#### PR Summary
This pull request introduces significant improvements to the multinode and multi-region capabilities of the system by adding new query rewriting functions and enhancing existing ones.
- `shard_colocation.c`: Added `RewriteConfigShardsQueryForDistribution` to handle shard configuration queries and `RewriteConfigChunksQueryForDistribution` to manage chunk configuration queries, including integration with Citus for shard size information.
2024-08-16 18:24:51 +03:00
Jayanta Mondal c364498a71 Merged PR 1413823: [engine] Additional tests and doc update for nested object index term truncation
### Does this PR have any customer impact?
No

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

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

### Description

1. Additional operator tests with truncated index terms
2. updated release notes
3. Updated index term truncation status docs
2024-08-16 18:24:51 +03:00
Vinod Sridharan 9250ed6931 Merged PR 1419383: [Flex] Fix rpath and copy of libs in Pgmongo extension
### Does this PR have any customer impact?
Fix rpath and copy of libs in Pgmongo extension

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

### 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
Fix rpath and copy of libs in Pgmongo extension

----
#### AI description  (iteration 1)
#### PR Classification
Bug fix to correct rpath and library copying in the Pgmongo extension for Flex builds.

#### PR Summary
This pull request addresses issues with runtime linker search paths and library copying in the Pgmongo extension when building for Flex.
- `pgmongo/Makefile`: Adjusted rpath settings and included `makefile.flex` for Flex builds.
- `scripts/flex/setup_pgmongo_layout.sh`: Removed unnecessary startup script copying and adjusted control file directory paths.
- `scripts/install_setup_citus_core.sh` and `scripts/build_dev_flex_container.sh`: Added Flex build flags.
- `scripts/makefile.flex`: Added new makefile to override rpath for Flex.
- Deleted `scripts/flex/OnStartup/on-startup-001-setup-extension.sh` as it is no longer needed.
2024-08-16 18:24:51 +03:00
Parag Jain f18511e737 Merged PR 1415927: [Infra] Native Colocation for flex pipelines and Minor Fixes
### Does this PR have any customer impact?
No

### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Infra
### 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
Let's enable native colocation for the all mariner runs in pipeline.

----
#### AI description  (iteration 1)
#### PR Classification
Infrastructure enhancement and minor bug fixes.

#### PR Summary
This pull request introduces native colocation for flex pipelines and includes minor bug fixes and enhancements.
- `PostgresMongoResultExtensions.cs`: Added handling for a new error message related to unsupported `EXPLAIN` with `MERGE` commands.
- `merge_stage_cx_scenario.js`: Added a test to verify that `EXPLAIN` is not supported with `MERGE` commands involving repartition.
- `pgmongo_postgres_flex.conf`: Enabled native colocation configuration.
- `utils.sh`: Updated Postgres configuration setup to include flex configuration for specific OS.
- `setup_test_env.yml`: Added `OsSku` parameter to the test environment setup.
2024-08-16 18:24:51 +03:00
Vinod Sridharan e3f19c609a Merged PR 1418794: [Native AOT Prep] Prepare for AOT related changes & Some backend perf
### Does this PR have any customer impact?
No

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

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

Gateway:
- Delete dead code from DisposableArraySegmentStream, VirtualByteArrayStream, CancellationTokenSourceExtensions, SoftTimeout, CosmosMongoResponse
- Reuse the same IList<IProtocolRequestMessage> across a connection
- Increase the DefaultIdleRefreshInterval per connection
- Trace dotnet counters into PgmongoGatewayDebug
- Dispose the request in the preauth path
- use SourceGenerated Explain ser/der and remove newtonsoft Json in that path

Backend:
- Don't copy the Cursor plan for single Page or non-cursor queries
- use Packed Pgbson for response bsons
- Don't evaluate index pushdowns on Btree/Vector indexes
- Remove allocation for table name in the planner path

----
#### AI description  (iteration 1)
#### PR Classification
Code cleanup and performance improvements in preparation for Native AOT changes.

#### PR Summary
This pull request removes unused classes and updates serialization attributes to improve backend performance and prepare for future AOT changes.
- Removed `MongoSoftTimeout` class from `Mongo.Core.Common/MongoSoftTimeout.cs`.
- Updated serialization attributes in `Mongo.Service.Postgres/Helpers/PostgresExplainHelper.cs` and added `PostgresExplainHelperContext` for JSON source generation.
- Removed `VirtualByteArrayStream` class from `Compute.Core/Utilities/VirtualByteArrayStream.cs`.
2024-08-16 18:24:51 +03:00
Cornelius Boateng d4bc5366ff Merged PR 1415920: [Operators] Support for Trigonometry operators
### Does this PR have any customer impact? Yes

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

### 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
Implemented support for $degreesToRadians, $radiansToDegrees, $sin, $cos, $tan, $sinh, $cosh, $tanh, $asin, $acos, $atan, $atan2, $asinh, and $atanh trig operators

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

#### PR Summary
This pull request adds support for trigonometric operators in BSON expressions.
- Added trigonometric functions (`$sin`, `$cos`, `$tan`, `$sinh`, `$cosh`, `$tanh`, `$asin`, `$acos`, `$atan`, `$atan2`, `$asinh`, `$acosh`, `$atanh`) in `oss/pg_helio_api/src/operators/bson_expression_trigonometry_operators.c`.
- Added extensive test cases for the new trigonometric operators in `/pgmongo/src/test/regress/expected/bson_aggregation_trigonometric_operators_tests.out`.
2024-08-16 18:24:51 +03:00
Murat Tuncer 3c3d57e6ab switch to PG16 2024-08-16 18:24:09 +03:00
gledis69 7e95cf5232 Redo the dependecy install 2024-08-16 18:24:09 +03:00
gledis69 caf2fe2899 Add libbson install back 2024-08-16 18:24:09 +03:00
gledis69 b3f6ba96ed Elevate all the install permissions 2024-08-16 18:24:09 +03:00
gledis69 0295952ce9 Give elevated premissions to pcre2 install 2024-08-16 18:24:09 +03:00
gledis69 c8d6c53993 Try without mongo-c-driver 2024-08-16 18:24:09 +03:00
gledis69 0551c58e7e Fix install step 2024-08-16 18:24:09 +03:00
gledis69 c848e1ddc2 Print intall_setup contents 2024-08-16 18:24:09 +03:00
gledis69 e9ef818084 Test installing without sudo 2024-08-16 18:24:09 +03:00
gledis69 a072014215 Switch up install order 2024-08-16 18:24:09 +03:00
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