[SERVER-30498] Investigate coll.group(cmd) is not causally consistent Created: 03/Aug/17  Updated: 27/Oct/23  Resolved: 22/Aug/17

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

Type: Bug Priority: Major - P3
Reporter: Misha Tyulenev Assignee: Misha Tyulenev
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2017-08-21, Sharding 2017-09-11
Participants:

 Description   

 
t = db.group2;
t.drop();
 
t.save({a: 2});
t.save({b: 5});
t.save({a: 1});
 
cmd = {
    key: {a: 1},
    initial: {count: 0},
    reduce: function(obj, prev) {
        prev.count++;
    }
};
 
result = t.group(cmd);
 
assert.eq(3, result.length, "A");
assert.eq(null, result[1].a, "C");

fails at the last line when it runs in causally consistent readPref secondary



 Comments   
Comment by Misha Tyulenev [ 22/Aug/17 ]

Thanks asya was looking just to be sure that there are no other non group related issues hiding there. This is non-deterministic test as it assumes a specific order of the group results.

Comment by Asya Kamsky [ 04/Aug/17 ]

Group command has been deprecated as of 3.4 (SERVER-14193) and there was a plan to remove it in 3.6 but it might slip till 3.8.

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