-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
Service Arch
-
Fully Compatible
-
ALL
-
-
Service arch 2020-10-05, Service arch 2020-10-19, Service Arch 2021-03-08, Service Arch 2021-03-22, Service Arch 2021-04-05, Service Arch 2021-04-19, Service Arch 2021-05-17, Service Arch 2021-07-12, Service Arch 2021-08-09, Programmability 2024-06-10, Programmability 2024-06-24, Programmability 2024-07-08, Programmability 2024-07-22, Programmability 2024-08-05, Programmability 2024-08-19, Programmability 2024-09-02, Programmability 2024-09-16, Programmability 2024-09-30, Programmability 2024-10-14, Programmability 2024-10-28
-
200
-
4
BF-18712 shows a TSAN true positive where setFastClockSource races with getFastClockSource due to latch_detail::Mutex::_onContendedLock's invocation of getFastClockSource before the setFastClockSource could occur.
There is no synchronization on the unique_ptr fields of ServiceContext, so these problems are unavoidable. Rather than making new obscure rules about when it's ok to call the getters, we can rather easily add synchronization to these fields, as they are private members. They could be stored in a synchronized unique_ptr wrapper.
Acceptance Criteria:
ServiceContext will call terminate if a setter happens after a given property has been accessed. Create a patch build to reproduce this and identify all the use cases where this was happening to create tickets that require a fix.
- causes
-
SERVER-51165 synchronized ServiceContext getters are too slow
- Closed
- has to be done after
-
SERVER-58450 Avoid resetting `ServiceContext` members in `db_catalog_test`
- Closed
-
SERVER-58451 Avoid resetting `ServiceContext` members in `db_pipeline_test`
- Closed
-
SERVER-58452 Avoid resetting `ServiceContext` members in `db_repl_coordinator_test`
- Closed
-
SERVER-58453 Avoid resetting `ServiceContext` members in `db_repl_test`
- Closed
-
SERVER-58454 Avoid resetting `ServiceContext` members in `CursorManagerTest`
- Closed
-
SERVER-58455 Avoid resetting `ServiceContext` members in `repltests`
- Closed
-
SERVER-58456 Avoid resetting `ServiceContext` members in `mongo_embedded_test`
- Closed
-
SERVER-58457 Avoid resetting `ServiceContext` members in `db_s_config_server_test`
- Closed
-
SERVER-58458 Avoid resetting `ServiceContext` members in `db_s_shard_server_test`
- Closed
-
SERVER-58459 Avoid resetting `ServiceContext` members in `db_stats_test`
- Closed
-
SERVER-58461 Avoid resetting `ServiceContext` members in `db_unittest_test`
- Closed
-
SERVER-58462 Avoid resetting `ServiceContext` members in `KeyGeneratorUpdateTest`
- Closed
- is duplicated by
-
SERVER-84118 Investigate where to reset FastClockSource in service context for mongos
- Closed
- related to
-
SERVER-59157 Add support for a shared-mutex type
- Closed
-
SERVER-58336 Use the fixture's instance of ServiceContext in CacheTest tests
- Closed