[SERVER-59618] Avoid using LockerNoop outside of unit tests Created: 26/Aug/21  Updated: 29/Oct/23  Resolved: 30/Sep/21

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

Type: Improvement Priority: Major - P3
Reporter: Gregory Wlodarek Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-60275 TSAN race in storage_wiredtiger_recor... Closed
related to SERVER-60388 ShardingWriteRouter GBenchmark Doesn'... Closed
related to SERVER-60691 benchmark_main does not register Clie... Closed
related to SERVER-60229 lock manager for mongos Closed
is related to SERVER-59591 LockerNoop::isW() always returns true... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2021-09-20, Execution Team 2021-10-04
Participants:

 Description   

A good portion of our mock interfaces are used to make unit testing easier. The LockerNoop::isW() method was changed to always return true, as an example. However, the LockerNoop is used outside of unit tests. Returning true that the global exclusive lock is held by multiple operations can result in bugs as seen in SERVER-59591.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 05/Oct/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-59618 mongocryptd and mqlrun register LockerNoopClientObserver with ServiceContext
Branch: fausto.leyva/SERVER-57826
https://github.com/10gen/mongo-enterprise-modules/commit/695d58036c9f5d3096d3a3efeb1d3d75dfd1fc7a

Comment by Githook User [ 05/Oct/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-59618 unit tests register LockerNoopClientObserver with ServiceContext
Branch: fausto.leyva/SERVER-57826
https://github.com/10gen/mongo-enterprise-modules/commit/74964d1f1f1fdf2a853caf32f93743a0ffde1277

Comment by Githook User [ 30/Sep/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-59618 require Locker instance when creating OperationContext
Branch: master
https://github.com/mongodb/mongo/commit/2eefd197e50c5d90b3ec0e0ad9ac15a8b14e3331

Comment by Githook User [ 29/Sep/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-59618 mongocryptd and mqlrun register LockerNoopClientObserver with ServiceContext
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/695d58036c9f5d3096d3a3efeb1d3d75dfd1fc7a

Comment by Githook User [ 29/Sep/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-59618 unit tests register LockerNoopClientObserver with ServiceContext
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/74964d1f1f1fdf2a853caf32f93743a0ffde1277

Comment by Githook User [ 29/Sep/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-59618 mongos_main registers LockerMongosClientObserver with ServiceContext
Branch: master
https://github.com/mongodb/mongo/commit/a433f99db68b62e216005d606281fa52356ed8b7

Comment by Githook User [ 29/Sep/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-59618 mongo_main registers LockerNoopClientObserver with ServiceContext
Branch: master
https://github.com/mongodb/mongo/commit/023c9aca749896a5a729794a7df90b02866f560a

Comment by Githook User [ 29/Sep/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-59618 mongobridge fixtures register LockerNoopClientObserver with ServiceContext
Branch: master
https://github.com/mongodb/mongo/commit/772fbdc155fa4c09c7d6a9315e25fe266872f2ff

Comment by Githook User [ 28/Sep/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-59618 SERVER-60275 temporarily remove ClientObserver registration from WiredTigerHarnessHelper
Branch: master
https://github.com/mongodb/mongo/commit/edd437e479d58cd191443c54d5af4b1b4c8287e7

Comment by Githook User [ 28/Sep/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-59618 stitch_support initialization registers this ClientObserver in unit tests with Service Context
Branch: master
https://github.com/mongodb/mongo/commit/673e9e029ed4ab3b50c8d59515496cab14a01b00

Comment by Githook User [ 28/Sep/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-59618 add LockerNoopClientObserverWithReplacementPolicy and use in bimodal unit test fixtures
Branch: master
https://github.com/mongodb/mongo/commit/031adee5f3bf0e83e98a1d2add8a9ce041180281

Comment by Githook User [ 28/Sep/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-59618 re-order ShardingMongodTestFixture base classes

This ensures that the implicit ServiceContext in ShardingTestFixtureCommon is
overridden by the one in ServiceContextMongoDTest.
Branch: master
https://github.com/mongodb/mongo/commit/155087837dd54f1712ab463f15555141865f2cd5

Comment by Githook User [ 28/Sep/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-59618 add LockerMongos and LockerMongosClientObserver. Register in sharding unit tests
Branch: master
https://github.com/mongodb/mongo/commit/3908a54ad0569d3cbe672923d78a41e2bb3cbb37

Comment by Githook User [ 28/Sep/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-59618 integration tests register LockerNoopClientObserver with ServiceContext
Branch: master
https://github.com/mongodb/mongo/commit/56fcb26c03a537e2dba6729249baac09569e4bcd

Comment by Githook User [ 27/Sep/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-59618 add LockerNoopClientObserver and register this ClientObserver in unit tests with Service Context
Branch: master
https://github.com/mongodb/mongo/commit/6b3acc72af58963a772213cc882e34b6db5bf144

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