[SERVER-35523] FSMWorkloadTestCase erroneously sets TestData.sameDB=true and TestData.sameCollection=true Created: 09/Jun/18  Updated: 29/Oct/23  Resolved: 02/Jul/18

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.0.1, 4.1.1

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

Issue Links:
Backports
Problem/Incident
is caused by SERVER-30204 Create resmoke.py hook that drops all... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0, v3.6
Sprint: TIG 2018-07-02, TIG 2018-07-16
Participants:

 Description   

The logic in the FSMWorkloadTestCase class is faulty because it sets TestData.sameDB=true when same_db=false and TestData.sameCollection=true when same_collection=false. However, these options currently have no effect because resmoke_runner.js doesn't define clusterOptions.sameDB and clusterOptions.sameCollection based on their associated TestData equivalents.

# We use a global incrementing counter as a prefix for the database name to avoid any
# collection lifecycle related issues in sharded clusters. This more closely matches how
# uniqueDBName() and uniqueCollName() would have returned distinct values when called once
# for each FSM workload in the entire schedule by runner.js.
test_prefix = self.db_name_prefix if self.db_name_prefix else "test"
test_data["dbNamePrefix"] = "{}{:d}_".format(test_prefix, count)
if not self.same_db:
    test_data["sameDB"] = True
if not self.same_collection:
    test_data["sameCollection"] = True



 Comments   
Comment by Githook User [ 05/Jul/18 ]

Author:

{'username': 'guoyr', 'name': 'Robert Guo', 'email': 'robert.guo@10gen.com'}

Message: SERVER-35523 fix fsmworkloadtestcase

(cherry picked from commit 5c73ea14a6fb2b5a9c071ad5d987b2dc900d12df)
Branch: v4.0
https://github.com/mongodb/mongo/commit/58fd54b251e770d84da37a6cea396ee2db9e0965

Comment by Githook User [ 02/Jul/18 ]

Author:

{'username': 'guoyr', 'name': 'Robert Guo', 'email': 'robert.guo@10gen.com'}

Message: SERVER-35523 fix fsmworkloadtestcase
Branch: master
https://github.com/mongodb/mongo/commit/5c73ea14a6fb2b5a9c071ad5d987b2dc900d12df

Comment by Max Hirschhorn [ 09/Jun/18 ]

Follow-up comment:
We should also go ahead and remove the repeated test_data["fsmWorkloads"] = self.fsm_workload_group line which appears to be from a bad merge of the changes from SERVER-29999.

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