[SERVER-79458] Remove "why" parameter from WriteOp::cancelWrites and unused BatchWriteOp::_cancelBatches method Created: 28/Jul/23  Updated: 29/Oct/23  Resolved: 09/Aug/23

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

Type: Improvement Priority: Minor - P4
Reporter: Kaitlin Mahar Assignee: Kaitlin Mahar
Resolution: Fixed Votes: 0
Labels: milestone-2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Repl 2023-08-07, Repl 2023-08-21
Participants:

 Description   

In SERVER-77269 we removed some logic from BatchWriteOp::cancelWrites that had no effect. Now that it is removed, the why parameter is no longer used, so we should just remove it and update the call sites to stop passing a value.

https://github.com/mongodb/mongo/blob/5f1b3024bf6e1d2f79e0c934a694b92929370c16/src/mongo/s/write_ops/write_op.cpp#L251

Also, the BatchWriteOp::_cancelBatches method which calls this method is not used so we can remove it as well.



 Comments   
Comment by Githook User [ 09/Aug/23 ]

Author:

{'name': 'Kaitlin Mahar', 'email': 'kaitlin.mahar@mongodb.com', 'username': 'kmahar'}

Message: SERVER-79458 Remove WriteOp::cancelWrites unused 'why' parameter and unused BatchWriteOp::_cancelBatches method
Branch: master
https://github.com/mongodb/mongo/commit/54857a1fef1e3a38160a0a0b1ef8c93c66ed818b

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