[SERVER-83443] Aggregation does not detect dependency on $text score metadata when lookup requires merging shard Created: 20/Nov/23  Updated: 01/Feb/24  Resolved: 01/Feb/24

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

Type: Bug Priority: Major - P3
Reporter: Jordi Serra Torrens Assignee: Alya Berciu
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File 0001-Repro.patch    
Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Apply the attached patch and run the following test:

/buildscripts/resmoke.py run --storageEngine=wiredTiger --storageEngineCacheSizeGB=.50 --log=file --suite=aggregation_mongos_passthrough jstests/aggregation/sources/lookup/lookup_contains_text.js

Sprint: QO 2024-02-05
Participants:

 Description   

This test case fails when the outer collection is sharded but the inner collection is unsharded (in this situation the pipeline is split and it requires a merging shard). The aggregation is failing to detect the dependency on the $text score metadata and executes it without error, when an error was expected. The result is then missing the 'score' field.



 Comments   
Comment by Githook User [ 31/Jan/24 ]

Author:

{'name': 'Alya Carina Berciu', 'email': 'alya.berciu@mongodb.com', 'username': 'alyacb'}

Message: SERVER-83443 Validate metadata of pipeline before splitting (#18555)

GitOrigin-RevId: ef14960b0a714e16cd381b1dd8dd5d8a5e22fefc
Branch: master
https://github.com/mongodb/mongo/commit/300ded9427b3fd23c09bbfaee733b6543196a10c

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