Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-53258

[Resharding] Reject writes in opObserver when disallowWritesForResharding is true

    XMLWordPrintableJSON

Details

    • Fully Compatible
    • Sharding 2021-01-25, Sharding 2021-02-22, Sharding 2021-03-08
    • 133
    • 2

    Description

      This is a stop-gap solution and doesn't have to be pretty. Just for now, reject writes when:

      1. The collection has reshardingFields, and
      2. The collection is in the states:
        1. kMirroring, or
        2. kRenaming and the UUID is the original collection.

      The above conditions are satisfied with the call to writesShouldRunInDistributedTransaction, which is the "blocking" state that's still named as the "distributed transaction" state.

      Suggestion: for now, create a named error code "WriteRejectedForResharding" that's easy to verify in a test. In Milestone 3, a more robust solution will be designed to possibly queue writes.

      Attachments

        Issue Links

          Activity

            People

              alex.taskov@mongodb.com Alexander Taskov (Inactive)
              blake.oler@mongodb.com Blake Oler
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: