[SERVER-41112] Add error context when TaskExecutorCursor receives an error Created: 13/May/19  Updated: 29/Oct/23  Resolved: 28/May/19

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

Type: Improvement Priority: Major - P3
Reporter: Ian Boros Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Query 2019-06-03
Participants:

 Description   

When mongot (or mongotmock) returns an error which gets propagated by mongod, it would be nice if mongod appended something to the error indicating that the error came from another node.



 Comments   
Comment by Githook User [ 28/May/19 ]

Author:

{'name': 'Martin Neupauer', 'email': 'martin.neupauer@mongodb.com', 'username': 'MartinNeupauer'}

Message: SERVER-41112 Add error context when TaskExecutorCursor receives an error.
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/67dba0834a901b94dd6238ad8ebe746e3aa57627

Comment by Ian Boros [ 23/May/19 ]

Since mongot may not use the same error codes as mongod, we think that this might need a different approach. What we came up just now was:

-Add special mongod error code for mongot errors

  • In the try/catch block which is around getting the next result from mongot, we will re-throw a new error has the generic mongot error code, and as extra error info/context, add the error code reported by mongot.

Note that for this to work completely, we may have to move the try/catch deeper (possibly into TaskExecutorCursor), to avoid bugs where a mongod error code gets interpreted as a mongot error.

Comment by Timothy Frietas (Inactive) [ 22/May/19 ]

Trying to follow: Do we mean that because the "other node" is a mongot node running on the same host as mongod that it will always return an error with a node name of localhost:28000?

If that's the case then I agree that right now that isn't useful information, especially to end users.

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