[DRIVERS-706] Collection and index creation in multi-doc txns Created: 16/Aug/19  Updated: 28/Oct/23  Resolved: 21/Feb/23

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Epic Priority: Major - P3
Reporter: Esha Bhargava Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on NODE-2295 Collection and index creation in mult... Closed
depends on CDRIVER-3419 Collection and index creation in mult... Closed
depends on CSHARP-2834 Collection and index creation in mult... Closed
depends on CXX-1868 Collection and index creation in mult... Closed
depends on GODRIVER-1391 Collection and index creation in mult... Closed
depends on MOTOR-449 Collection and index creation in mult... Closed
depends on PHPLIB-496 Test collection and index creation in... Closed
depends on PYTHON-2030 Collection and index creation in mult... Closed
depends on RUST-363 Collection and index creation in mult... Closed
depends on JAVA-3492 Collection and index creation in mult... Closed
depends on RUBY-1995 Test collection and index creation in... Closed
Server Compat: 4.4
Quarter: FY21Q1
Upstream Changes Summary:

Summary: Allow creating collections inside multi-document transactions.
Goals: Allow the following operations in a multi-document transaction:

  • insert (including upsert) into a non-existing collection to implicitly create it.
  • create a collection.
  • createIndexes on an empty collection created in the same transaction or on a non-existing collection, implicitly creating it..
  • createIndexes where the index already exists (ensuring existence)
  • Allow $out for cases where the target does not exist ( {dropTarget: false}

    ).

  • Allow $merge in aggregations.
  • Avoid MODE_X collection locks for DDL operations inside transactions
    These operations will be part of the transaction, and abort/commit together with the rest of the transaction.
Cost Threshold %: 100
Driver Compliance:
Key Status/Resolution FixVersion
NODE-2295 Fixed 3.6.0
PHPLIB-496 Fixed 1.7.0-beta1, 1.7.0
GODRIVER-1391 Fixed 1.4.0
JAVA-3492 Fixed 4.1.0
CDRIVER-3419 Fixed 1.17.0-beta, 1.17.0
PYTHON-2030 Fixed 3.11
CSHARP-2834 Fixed 2.11.0
RUBY-1995 Fixed 2.13.0.beta1
CXX-1868 Fixed 3.6.0-rc0, 3.6.0
MOTOR-449 Won't Do
RUST-363 Duplicate
SWIFT-789 Done

 Description   
Epic Summary

Summary

This project is to allow creation, renaming and dropping of collections inside of multi-document transactions on a replica set.

Motivation

This is a pre-requisite to implementing transactional sharded create, rename and drop. Applications may implicitly create collections on first insertion, so not allowing that inside transactions limits the usability of transactions. Aggregations with $out require renaming and potentially dropping existing collections.

Lead : Matt
Author : Andreas
POCs : Node, Java, PHP - Andreas

Spec Update: https://github.com/mongodb/specifications/commit/de5b560ebe2ba28d9569031ed8ea1df3164eeef7#diff-7a1749b8c865dfb4e49125f9bd6a8bd7


Generated at Thu Feb 08 08:22:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.