[SERVER-30468] Speed up checking for duplicate error codes Created: 01/Aug/17  Updated: 30/Oct/23  Resolved: 09/Aug/17

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 3.5.12

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

Issue Links:
Related
related to SERVER-59639 re-enable the use of regex in errorco... Closed
Backwards Compatibility: Fully Compatible
Sprint: Repl 2017-08-21
Participants:

 Comments   
Comment by Githook User [ 09/Aug/17 ]

Author:

{'username': 'RedBeard0531', 'email': 'mathias@10gen.com', 'name': 'Mathias Stearn'}

Message: SERVER-30468 switch from re2 to regex for errorcodes.py

It is easier to install and seems to be faster.
Branch: master
https://github.com/mongodb/mongo/commit/7b8d937701459cf32a49744594885d0fbcaef395

Comment by Githook User [ 08/Aug/17 ]

Author:

{'username': 'RedBeard0531', 'email': 'mathias@10gen.com', 'name': 'Mathias Stearn'}

Message: SERVER-30468 Optimize errorcodes.py

  • Only look in src/mongo rather than filtering after the fact
  • Use re2 if available
  • Lazily convert byte offsets to line numbers only when needed

Also I added a --quiet option to make it silent on success.
Branch: master
https://github.com/mongodb/mongo/commit/5b71d07dfc97cef7e4b41ffacbf01f51fca55053

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