[SERVER-37709] Fix race in lock_stats_suboperation_curop.js Created: 22/Oct/18  Updated: 29/Oct/23  Resolved: 24/Oct/18

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

Type: Bug Priority: Major - P3
Reporter: Xiangyu Yao (Inactive) Assignee: Xiangyu Yao (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Storage NYC 2018-11-05
Participants:
Linked BF Score: 18

 Description   

This is only a test fix for lock_stats_suboperation_curop.js on mobile platform.

lock_stats_suboperation_curop.js uses assert.soon and currentOp() to make sure index build has started and then checks the 'lockStats' section for 'timeAcquiringMicros'. However, there is a very small time window between the time currentOp() catches the index build and index build takes the lock. In this scenario, the test would find 'lockStats' section being empty.

To fix this, assert.soon should wait until all the locks are held.



 Comments   
Comment by Githook User [ 24/Oct/18 ]

Author:

{'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com', 'username': 'xy24'}

Message: SERVER-37709 Fix race in lock_stats_suboperation_curop.js
Branch: master
https://github.com/mongodb/mongo/commit/9742b004efd8239c4903fc92f290eb9cf1ef94c2

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