[SERVER-55199] Make it impossible to call OperationContext::markKilled without the client lock Created: 15/Mar/21  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Matthew Saltz (Inactive) Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: sa-remove-fv-backlog-22
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Service Arch
Participants:

 Description   

OperationContext::markKilled requires the client lock, but there's nothing in the actual API to prevent a user from calling it without the client lock. ServiceContext::killOperation on the other hand at least requires a WithLock parameter to make it somewhat more obvious. But then the existence of both of these functions makes me wonder whether ordinary users of OperationContext should even be able to call markKilled or whether we should only use the ServiceContext function.

This is part of a broader issue I see which is that we should properly encapsulate the Client lock so that this isn't even an issue. After discussion with the team we might decide to turn this into a broader ticket to do that work instead.

Acceptance criteria:

  • It is impossible to call OperationContext::markKilled without the Client lock

Generated at Thu Feb 08 05:35:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.