[SERVER-66581] Disallow FeatureFlagUtil.isEnabled to get parameters from routers Created: 19/May/22  Updated: 29/Oct/23  Resolved: 15/Jun/22

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: Antonio Fuschetto
Resolution: Fixed Votes: 0
Labels: neweng, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding EMEA 2022-06-13, Sharding EMEA 2022-06-27
Participants:

 Description   

Adapt FeatureFlagUtil.isEnabled in order to throw an exception in case a db coming from a mongos is passed as argument.

Reproducible with BalanceAccordingToDataSize feature flag disabled by default but enabled via resmoke params:

const st = new ShardingTest({
  name: clusterName,
  shards: 1
});
print('enabled on mongos ' + FeatureFlagUtil.isEnabled(st.s.getDB('admin'), 'BalanceAccordingToDataSize'));
print('enabled on CSRS ' +
FeatureFlagUtil.isEnabled(st.configRS.getPrimary().getDB('admin'), 'BalanceAccordingToDataSize'));

Output:

enabled on mongos false
enabled on CSRS true



 Comments   
Comment by Githook User [ 15/Jun/22 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-66581 Disallow FeatureFlagUtil.isEnabled to get parameters from routers
Branch: master
https://github.com/mongodb/mongo/commit/4fda2fe353df92e715b69bdd262dbb052743514f

Comment by Githook User [ 15/Jun/22 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-66581 Disallow FeatureFlagUtil.isEnabled to get parameters from routers
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/f7a2fe457a4267c2ea0b841cf169fe7b7d6fb9b3

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