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

Better writeConflictRetry like wrapper to support multiple namespace

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution

      The change collection code in secondaries uses the insertBatchAndHandleRetry method to insert documents to change collections and the oplog. The method insertBatchAndHandleRetry uses writeConflictRetry to perform retries. This writeConflictRetry accepts a namespace to log a debug message (associated with that namespace) in case of retries. This is the only utility of passing namespace to the writeConflictRetry.

      The writeConflictRetry does not fit nicely for the secondary cases when change collections are enabled. Because in this case, we pass the oplog namespace to the function insertBatchAndHandleRetry even though we still write to the oplog and change collections. And as such, if the writeConflictRetry performs retries because of failures in writing to the change collection, the debug message will still display oplog as the namespace.

       

      The ticket is about devising a new writeConflictRetry-like wrapper that can work with multiple namespaces. It should be noted that this is a very low-priority ticket.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            rishab.joshi@mongodb.com Rishab Joshi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: