[SERVER-66813] Fix issue with batch deletion when inserting records to the change collection Created: 26/May/22  Updated: 09/Jul/22  Resolved: 08/Jul/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Critical - P2
Reporter: Rishab Joshi (Inactive) Assignee: Rishab Joshi (Inactive)
Resolution: Duplicate Votes: 0
Labels: pm-2334-m1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-67473 Support insert operations for implici... Closed
Sprint: QE 2022-07-11
Participants:

 Description   

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.



 Comments   
Comment by Rishab Joshi (Inactive) [ 08/Jul/22 ]

This issue will be fixed as part of the ticket  SERVER-67473

The PR has been discarded as there was no consensus on having a custom insert method for the change collection.

 

Comment by Josef Ahmad [ 06/Jul/22 ]

Marking this ticket as related to SERVER-67473 "Support insert operations for implicitly replicated namespaces".

Generated at Thu Feb 08 06:06:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.