[SERVER-31451] ShardingTest causallyConsistent flag doesn't seem to enable causal consistency Created: 06/Oct/17  Updated: 30/Oct/23  Resolved: 13/Oct/17

Status: Closed
Project: Core Server
Component/s: Sharding, Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.6.0-rc1

Type: Bug Priority: Major - P3
Reporter: Ian Boros Assignee: Misha Tyulenev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Participants:

 Description   

According to shardingtest.js the causallyConsistent flag does the following:

causallyConsistent {boolean}: Specifies whether the connections to the replica set nodes

But when the following test is run:

python buildscripts/resmoke.py enable-causal.py

enable-causal.js

(function() {
    const st = new ShardingTest({mongos: 1, shards: 2, rs: {nodes: 2}, config: 1, causallyConsistent: true});
 
    jsTest.log("Is shard0 causal? " + st.shard0.isCausalConsistency());
    jsTest.log("Is shard1 causal? " + st.shard1.isCausalConsistency());
    jsTest.log("Is mongos causal? " + st.s.isCausalConsistency());
 
    st.stop();
}());

The test prints "false" for all 3 statements. This seems buggy (or at least confusing). It would be more intuitive if the flag enabled causal consistency on the connection to the mongos, (since that's usually where most of the test's commands will go to) as well as on the connections to the shards.



 Comments   
Comment by Githook User [ 13/Oct/17 ]

Author:

{'email': 'misha@mongodb.com', 'name': 'Misha Tyulenev', 'username': 'mikety'}

Message: SERVER-31451 fix causallyConsistent flag in ShardingTest
Branch: master
https://github.com/mongodb/mongo/commit/10dbb695223d08dd5a4412e1319228496d606b13

Comment by Misha Tyulenev [ 13/Oct/17 ]

Its a bug in shardingtest.

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