[SERVER-43074] Do not use a global variable to encode 'multikeyPath' information when writing out catalog documents Created: 28/Aug/19  Updated: 29/Oct/23  Resolved: 30/Aug/19

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: 3.4.22, 3.6.14, 4.0.12, 4.2.0
Fix Version/s: 3.6.15, 4.0.13, 3.4.23, 4.2.1, 4.3.1

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

Issue Links:
Backports
Depends
Related
is related to SERVER-22726 Extend the KVCatalog to store path-le... Closed
is related to SERVER-43081 validate should report when an index'... Closed
is related to SERVER-43087 Log a startup warning when an index h... Closed
is related to SERVER-46147 Update repair to fix multikey errors ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2, v4.0, v3.6, v3.4
Sprint: Execution Team 2019-09-09
Participants:
Linked BF Score: 55

 Description   

There is no synchronization to protect this variable from being accessed concurrently, which may cause concurrent writers to write out incorrect "multikeyPath" information to catalog documents.



 Comments   
Comment by Geert Bosch [ 03/Sep/19 ]

This would most likely have been caught for years ago if we had been using thread sanitizers...

Comment by Githook User [ 30/Aug/19 ]

Author:

{'name': 'Daniel Gottlieb', 'username': 'dgottlieb', 'email': 'daniel.gottlieb@mongodb.com'}

Message: SERVER-43074: Make appendMultikeyPathsAsBytes threadsafe.

The method previously relied on catalog level serialization for guaranteeing
serialized access to a global variable.

(cherry picked from commit eb47871d19c81d08827f83df0554ce2c83cd8487)
Branch: v4.0
https://github.com/mongodb/mongo/commit/12c21c952a48fe83af11c19beb9761635ec0e699

Comment by Githook User [ 30/Aug/19 ]

Author:

{'name': 'Daniel Gottlieb', 'username': 'dgottlieb', 'email': 'daniel.gottlieb@mongodb.com'}

Message: SERVER-43074: Make appendMultikeyPathsAsBytes threadsafe.

The method previously relied on catalog level serialization for guaranteeing
serialized access to a global variable.

(cherry picked from commit eb47871d19c81d08827f83df0554ce2c83cd8487)
Branch: v4.2
https://github.com/mongodb/mongo/commit/fb45aa40b8c6f8796ca757c817f28790a0025ff2

Comment by Githook User [ 30/Aug/19 ]

Author:

{'name': 'Daniel Gottlieb', 'username': 'dgottlieb', 'email': 'daniel.gottlieb@mongodb.com'}

Message: SERVER-43074: Make appendMultikeyPathsAsBytes threadsafe.

The method previously relied on catalog level serialization for guaranteeing
serialized access to a global variable.

(cherry picked from commit eb47871d19c81d08827f83df0554ce2c83cd8487)
Branch: v3.4
https://github.com/mongodb/mongo/commit/4406a3674738f41826413a412025b1cef4857024

Comment by Githook User [ 30/Aug/19 ]

Author:

{'email': 'daniel.gottlieb@mongodb.com', 'name': 'Daniel Gottlieb', 'username': 'dgottlieb'}

Message: SERVER-43074: Make appendMultikeyPathsAsBytes threadsafe.

The method previously relied on catalog level serialization for guaranteeing
serialized access to a global variable.

(cherry picked from commit eb47871d19c81d08827f83df0554ce2c83cd8487)
Branch: v3.6
https://github.com/mongodb/mongo/commit/29ea16120d5fb478c3728a4ab3aac044df82a387

Comment by Githook User [ 29/Aug/19 ]

Author:

{'email': 'daniel.gottlieb@mongodb.com', 'name': 'Daniel Gottlieb', 'username': 'dgottlieb'}

Message: SERVER-43074: Make appendMultikeyPathsAsBytes threadsafe.

The method previously relied on catalog level serialization for guaranteeing
serialized access to a global variable.
Branch: master
https://github.com/mongodb/mongo/commit/eb47871d19c81d08827f83df0554ce2c83cd8487

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