[SERVER-67168] Better writeConflictRetry like wrapper to support multiple namespace Created: 10/Jun/22  Updated: 19/May/23  Resolved: 21/Apr/23

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

Type: Improvement Priority: Minor - P4
Reporter: Rishab Joshi (Inactive) Assignee: Backlog - Query Execution
Resolution: Won't Do Votes: 0
Labels: pm-2334-followup, tech-debt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-76431 Complete TODO listed in SERVER-67168 Closed
Assigned Teams:
Query Execution
Participants:

 Description   

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.



 Comments   
Comment by Kyle Suarez [ 21/Apr/23 ]

After discussion in the quick wins triage we just don't see us making the refactor at call sites to improve the log message. bernard.gorman@mongodb.com or sebastien.mendez@mongodb.com, please reopen this ticket and send it for retriage if you disagree.

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