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

Fix issue with batch deletion when inserting records to the change collection

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: None
    • QE 2022-07-11

      When working on the ticket: SERVER-66123 which is about inserting record to the change collection in the primary, a lot of transaction-related test cases, related to the efficient multi-delete project started failing. The Evergreen link is here and the tassert is Not enough \"applyOps\" entries"

      The problem is with calling onBatchedWriteCommit, which calls logOplogEntries which further call logApplyOps and then ChangeCollection::writeToChangeCollection and ultimately to OpObserverImpl::onInserts.

      The OpObserverImpl::onInserts is called within the context of the BatchWrites and will go to and again try to add operation to the addBatchOperation here. This adding operation to the ongoing batch is what may be causing the issue (not fully articulated though).

      This whole workflow is called while we are inside the while loop that caused the tassert failure, here.

      The current change collection code adds a hack to mitigate this issue. The ticket is about coming up with the right set of actions to fix this issue.

            Assignee:
            rishab.joshi@mongodb.com Rishab Joshi (Inactive)
            Reporter:
            rishab.joshi@mongodb.com Rishab Joshi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: