[SERVER-50057] Do not use StringDataSet in OperationShardingState Created: 31/Jul/20  Updated: 29/Oct/23  Resolved: 05/Aug/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Haley Connelly
Resolution: Fixed Votes: 0
Labels: PM-1645-Milestone-1, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
is caused by SERVER-47532 ShardServerProcessInterface: Convert ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2020-08-10
Participants:
Linked BF Score: 95

 Description   

https://github.com/mongodb/mongo/blob/f284ee159e0319b9071661385f7ff421946a821f/src/mongo/db/index_builds_coordinator_mongod.cpp#L206-L209

StringData is used for storing unowned strings and the original strings can get freed, so they should not be used in OperationShardingState which has the same life time as the operation context.



 Comments   
Comment by Githook User [ 05/Aug/20 ]

Author:

{'name': 'Haley Connelly', 'email': 'haley.connelly@mongodb.com', 'username': 'haleyConnelly'}

Message: SERVER-50057 Do not use StringDataSet in OperationShardingState
Branch: master
https://github.com/mongodb/mongo/commit/43d3e2d7897745fd6fd351f488830364da218802

Comment by Randolph Tan [ 03/Aug/20 ]

Backport is not necessary. I forgot that we branched earlier.

Comment by Kaloian Manassiev [ 03/Aug/20 ]

renctan, I noticed that you requested BACKPORT-7697, but this was introduced as part of PM-1645, which hasn't yet been backported. Is this backport still necessary?

Comment by Max Hirschhorn [ 31/Jul/20 ]

I believe using StringSet rather than StringDataSet for OperationShardingState:: _shardVersionsChecked would fix this.

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