[SERVER-69476] Key collision with different value causes test failure Created: 06/Sep/22  Updated: 29/Oct/23  Resolved: 16/Oct/23

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Nandini Bhartiya Assignee: Mikhail Shchatko
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Development Platform
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: DAG 2023-10-16, DAG 2023-10-30
Participants:

 Description   

I see the following error which running a javascript test:
[js_test:global_index_feature_flagging] d20040| Key Value Option: setParameter has a duplicate key from the same source: featureFlagGlobalIndexes
[js_test:global_index_feature_flagging] d20040| try '/data/mci/218dec7f98e35923596ad6efaf9d63e8/src/dist-test/bin/mongod --help' for more information
My test is setting the featureFalgGlobalIndexes to false but the test is invoked with TestData["setParameters"]["featureFlagGlobalIndexes"] = "true" which causes a key collision and the test fails on seeing a different value than the one used for invocation (https://github.com/10gen/mongo/blob/330458e81f9baa3f936d639dc3edbe1a8c4c5a32/src/mongo/util/options_parser/options_parser.cpp#L838). Is there a config change that needs to be made for the test to run successfully ?



 Comments   
Comment by Githook User [ 16/Oct/23 ]

Author:

{'name': 'Mikhail Shchatko', 'email': 'mikhail.shchatko@mongodb.com', 'username': 'MikhailShchatko'}

Message: SERVER-69476 setParameter options from JS test should prevail over other configurations
Branch: master
https://github.com/mongodb/mongo/commit/3f90ebabffb7cb9256ec5ffd4ca3fdd4f2322587

Comment by Alex Neben [ 03/Oct/23 ]

The ask here is to be able to write a test as described in the ask where we set featureFalgGlobalIndexes = false in the test where we don't fail with the error message above. First we should reproduce the problem then we should fix it.

Comment by Max Hirschhorn [ 28/Jun/23 ]

Yes, I believe this is still a problem engineers run into. One workaround can be to remove the feature flag setting from the global TestData options like with the following snippet.

delete TestData.setParameters.featureFlagGlobalIndexes;
delete TestData.setParametersMongos.featureFlagGlobalIndexes;
 
const st = new ShardingTest(...);

Comment by Alex Neben [ 20/Jun/23 ]

Is this still a problem?

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