[SERVER-41120] Interrupt code gets converted to ErrorCodes::Interrupted during $where execution Created: 13/May/19  Updated: 29/Oct/23  Resolved: 06/Jun/19

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: 4.1.11
Fix Version/s: 4.2.0-rc2, 4.3.1

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Gabriel Russell (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.2
Sprint: Dev Tools 2019-06-03, Dev Tools 2019-06-17
Participants:
Linked BF Score: 37

 Description   

For example, when a step down happens, the waitForCondition call will trigger with an assertion of the correct interrupt code. It will then store the interrupt code via the catch block, and at the same time call MozJSImplScope::kill, however, since the opCtx is not registered in the implscope, it will fail this condition and go ahead and set the status to interrupted. Then, it will call check error inside invoke, which will see that the status was set to interrupt and throw the interrupted error.



 Comments   
Comment by Githook User [ 20/Jun/19 ]

Author:

{'name': 'Gabriel Russell', 'email': 'gabriel.russell@mongodb.com', 'username': 'gabrielrussell'}

Message: SERVER-41120 perserve the correct status during scope timeout
Branch: v4.2
https://github.com/mongodb/mongo/commit/84519c5dcffde5e59a007a19be32d943b32e908e

Comment by Githook User [ 06/Jun/19 ]

Author:

{'name': 'Gabriel Russell', 'email': 'gabriel.russell@mongodb.com', 'username': 'gabrielrussell'}

Message: SERVER-41120 perserve the correct status during scope timeout
Branch: master
https://github.com/mongodb/mongo/commit/b63264646b4d81e27cfd6e16d61a90ba31dd3d95

Comment by Randolph Tan [ 13/May/19 ]

Note: in the current master, stepdown won't kill the query running $where because it will conflict with the lock.

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