Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-3370

Allow passing bypassEmptyTsReplacement via BulkWrite

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.17.3
    • Affects Version/s: None
    • Component/s: None
    • None
    • Go Drivers
    • Not Needed

      SERVER-88750 added an experimental bypassEmptyTsReplacement flag that tells the server to accept Timestamp(0, 0) as a literal rather than replacing it with current time. This is needed to solve certain data consistency problems in both mongosync and mongorestore. (See CA-34 for details.)

      mongorestore uses the driver's BulkWrite interface. As best I can tell that interface offers no way to pass bypassEmptyTsReplacement to the server; thus, we can't actually fix the consistency problem without help from the driver.

      I suspect this would most sensibly be implemented as a generic means of passing custom parameters to the underlying insert, replace, etc.

      Acceptance criteria:

      • The following CRUD operations accept a bypassEmptyTsReplacement option:
        • insertOne
        • insertMany
        • updateOne
        • updateMany
        • replaceOne
        • findOneAndUpdate
        • findOneAndReplace
        • collection.bulkWrite
        • client.bulkWrite
      • If no value for bypassEmptyTsReplacement is given, it must not be added to the command
      • The option must not be added to documentation
      • In the code, the option must be marked as internal, indicating that users should not rely on it.

            Assignee:
            qingyang.hu@mongodb.com Qingyang Hu
            Reporter:
            felipe.gasper@mongodb.com Felipe Gasper
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 1 week
                1w
                Logged:
                Time Spent - Not Specified
                Not Specified