[SERVER-34235] isNetworkError doesn't correctly check for SocketException error Created: 30/Mar/18  Updated: 29/Oct/23  Resolved: 02/Apr/18

Status: Closed
Project: Core Server
Component/s: Replication, Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.7.4

Type: Bug Priority: Minor - P4
Reporter: William Schultz (Inactive) Assignee: William Schultz (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:
Linked BF Score: 8

 Description   

In mongo/shell/utils.js, the retryOnNetworkError method calls isNetworkError which looks for the following strings in the error message to determine if it is a network error:

  1. "network error"
  2. "error doing query"
  3. "socket exception"

Since these checks are case sensitive, it will miss network error messages that print "SocketException".



 Comments   
Comment by Githook User [ 02/Apr/18 ]

Author:

{'email': 'william.schultz@mongodb.com', 'name': 'William Schultz', 'username': 'will62794'}

Message: SERVER-34235 isNetworkError correctly checks for SocketException error

The 'isNetworkError' shell utility function checks for
network errors based on the error message string, and the
string patterns that it checked omitted a few common network error messages
i.e. 'SocketException'. This patch makes isNetworkError correctly
recognize more network error messages matching a wider variety of
capitalized and non-capitalized error message strings.
Branch: master
https://github.com/mongodb/mongo/commit/2dd6c0e207894b79460fe60d9148b3f8000ef302

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