[SERVER-79562] Async function passed to funWithArgs is not executed properly Created: 01/Aug/23  Updated: 29/Oct/23  Resolved: 02/Aug/23

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

Type: Bug Priority: Major - P3
Reporter: Matt Broadstone Assignee: Matt Broadstone
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Server Serverless 2023-08-07
Participants:

 Description   

Passing the following function to funWithArgs will not propagate the internal error:

import { funWithArgs } from "jstests/libs/parallel_shell_helpers.js";
 
const test = true;
const awaitShell = startParallelShell(funWithArgs(async function(test) {
    throw new Error("intentionally thrown")
}, test), undefined, true);
 
awaitShell();



 Comments   
Comment by Githook User [ 03/Aug/23 ]

Author:

{'name': 'Matt Broadstone', 'email': 'mbroadst@mongodb.com', 'username': 'mbroadst'}

Message: SERVER-79562 Await results of async functions passed to funWithArgs
Branch: minh.luu-no_compile_sys-perf
https://github.com/mongodb/mongo/commit/7f47bd43882c1b3ae56c004ef3402e5ceabd27ee

Comment by Githook User [ 02/Aug/23 ]

Author:

{'name': 'Matt Broadstone', 'email': 'mbroadst@mongodb.com', 'username': 'mbroadst'}

Message: SERVER-79562 Await results of async functions passed to funWithArgs
Branch: master
https://github.com/mongodb/mongo/commit/7f47bd43882c1b3ae56c004ef3402e5ceabd27ee

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