-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
None
-
Fully Compatible
-
Service Arch 2022-06-13, Service Arch 2022-06-27, Service Arch 2022-07-11
-
1
The script currently suggests new IDs for logs and assertions:
(python3-venv) ubuntu@vm:~/mongo$ python buildscripts/errorcodes.py ok: True next: 8423348
Also, it doesn't check for IDs used by iasserts.
We should change errorcodes.py to check for IDs used by internal assertions (see here) and modify the script so that it doesn't recommend new IDs unless a ticket number is provided.
It's recommended to useĀ buildscripts/errorcodes.py to choose new IDs for assertions and ErrorCodes. Internally, the script scans the code for the maximum ID used by all assertions, error codes, and LOGV2 log identifiers. Then it increments the maximum by one and returns it as the recommended ID for new assertions and ErrorCodes.
However, this approach is very error-prone. It heavily relies on the IDs picked by programmers, and does not follow any of the already defined rules for choosing identifiers (e.g., the LOGV2 documentation for using SERVER ticket numbers to construct log IDs).
We need to define a clear policy for picking IDs and update errorcodes.py to honor the new policy.
- is related to
-
SERVER-48719 Expand Documentation for Server-Internal Error Reporting
- Closed
-
SERVER-49151 Fix malformed LOGV2 and assertion IDs
- Closed