[SERVER-83568] Extend assertAggFuzzerResultDivergenceIsAcceptable() to cover any pipeline that has $group stage and spilling is not disabled Created: 24/Nov/23  Updated: 19/Dec/23  Resolved: 19/Dec/23

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

Type: Task Priority: Major - P3
Reporter: Serhii Lysenko Assignee: Serhii Lysenko
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Sprint: QE 2023-12-11, QE 2023-12-25
Participants:
Linked BF Score: 8

 Description   

$group doesn't guarantee the order in which records inside the group are being aggregated, this can cause divergencies in resulting values if involved types are not  associative over given aggregation function (e.g. when summing up floating point numbers)

Generally we should not expect even the same $group query over the same data set to generate the same result. 

Release and debug variants of group stage use different spilling strategy that causes some multiversion tests to generate results with slightly different roundoff errors. 

There is a function in src/fuzzers/agg/agg_compare_results.js called assertAggFuzzerResultDivergenceIsAcceptable() that covers exactly this scenario. It should be extended to cover the case when $group stage is allowed to spill to disk.



 Comments   
Comment by Serhii Lysenko [ 19/Dec/23 ]

Another solution proposed: https://jira.mongodb.org/browse/SERVER-84315 

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