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

[Resharding] Reject writes in opObserver when disallowWritesForResharding is true

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Sharding 2021-01-25, Sharding 2021-02-22, Sharding 2021-03-08
    • Linked BF Score:
      133
    • Story Points:
      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

              Assignee:
              alex.taskov Alexander Taskov (Inactive)
              Reporter:
              blake.oler Blake Oler
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: