[SERVER-52657] index_commands_shard_targeting.js relies on too short MaxTimeMs Created: 06/Nov/20  Updated: 29/Oct/23  Resolved: 10/Dec/20

Status: Closed
Project: Core Server
Component/s: Sharding, Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.9.0, 4.4.7

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4, v4.2, v4.0
Steps To Reproduce:

Reduce this maxTimeMs to something small like 10ms.

Participants:
Linked BF Score: 17

 Description   

index_commands_shard_targeting.js runs index related commands with a maxTimeMs of 500ms and expects the following two things to happen:

  1. These commands will get stuck waiting for a paused migration to finish and eventually fail with MaxTimeMsExpired error.
  2. A log line to appear in shard0 indicating that the collection refresh failed due maxTimeMs expiration.

This works most of the time, but on slow variants it can happen that those requests reach their maxTimeMs at an earlier stage of their execution causing the mongos to cancel the request. In these cases the commands will still fail with MaxTimeMsExpired [1], but they didn't have the chance to reach the shard so [2] won't be fulfilled.



 Comments   
Comment by Githook User [ 02/Jul/21 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-52657 index_commands_shard_targeting.js relies on too short MaxTimeMs
Branch: v4.4
https://github.com/mongodb/mongo/commit/058cf0c5b2a087256486373e2d9d3715afe54baf

Comment by Githook User [ 10/Dec/20 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-52657 Increase MaxTimeMs in index_commands_shard_targeting.js to prevent false negative outcomes
Branch: master
https://github.com/mongodb/mongo/commit/f8faf01c342911d7becb3e324d9ae4fcc120a78d

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