Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-706

Collection and index creation in multi-doc txns

    • Type: Icon: Epic Epic
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: None
    • None
    • To Do
    • Support for collection creation in Transactions
    • 100
    • Hide

      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.
      Show
      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.

      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

            Assignee:
            Unassigned Unassigned
            Reporter:
            esha.bhargava@mongodb.com Esha Bhargava
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: