[SERVER-51168] Write the test case for killOp in database_versioning_all_commands.js Created: 27/Sep/20  Updated: 16/May/23  Resolved: 16/May/23

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

Type: Task Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Allison Easton
Resolution: Won't Fix Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Sharding EMEA
Sprint: Sharding EMEA 2023-05-29
Participants:

 Description   

Based on this documentation and the code here, mongos does killOp to the primary shard so we should write a test case for it.



 Comments   
Comment by Allison Easton [ 16/May/23 ]

KillOp does propagate commands to shards in some situations, but it doesn't send the command to the shard primary. The "From a Shard Member" section of the documentation here is saying that to kill the op on the shard, you should connect directly to the shard and run killOp. The "Without a Session" option in the docs is to specify which shard you want the mongoS to propagate the killOp command to by using the format "db.killOp("shardB:79014");".

In the code, we can see that when the command is being forwarded to a shard, it isn't sent to the dbPrimary, but is sent to the shard from the string sent in the command.

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