[SERVER-49151] Fix malformed LOGV2 and assertion IDs Created: 26/Jun/20 Updated: 08/Jan/24 Resolved: 02/Jul/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Logging |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc13, 4.7.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Amirsaman Memaripour | Assignee: | Amirsaman Memaripour |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||||||
| Sprint: | Service arch 2020-07-13 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 22 | ||||||||||||||||
| Description |
|
According to the LOGV2 documentation, programmers should use the following to choose log IDs: The ID is a signed 32bit integer in the same number space as the error code numbers. It is used to uniquely identify a log statement. If changing existing code, using a new ID is strongly advised to avoid any parsing ambiguity. When selecting ID during work on JIRA ticket SERVER-ABCDE you can use the JIRA ticket number to avoid ID collisions with other engineers by taking ID from the range ABCDE00 - ABCDE99. However, there are multiple instances in the code-base such as this one, where we have not followed the above pattern to pick log and assertion identifiers. This ticket should find all instances of malformed LOGV2 and assertion identifiers and replace them with new IDs, generated by employing the above pattern. |
| Comments |
| Comment by Githook User [ 02/Jul/20 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: (cherry picked from commit 813c96fc1e6d6e5ea422356352b671c3af3e403d) |
| Comment by Githook User [ 02/Jul/20 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: (cherry picked from commit d4e7ea57599b44353b5393afedee8ae5670837b3) |
| Comment by Kelsey Schubert [ 02/Jul/20 ] |
|
We should complete the backport, so we don't have backwards breaking changes. jonathan.streets, can you provide access to directly push? |
| Comment by Githook User [ 01/Jul/20 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: |
| Comment by Githook User [ 01/Jul/20 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: |
| Comment by Bruce Lucas (Inactive) [ 01/Jul/20 ] |
|
We should not do this at all unless we backport, preferrably to 4.4.0 if at all possible, as it is a breaking change. kelsey.schubert can we get this into 4.4.0 if we get it done this week? |
| Comment by Amirsaman Memaripour [ 30/Jun/20 ] |
|
mira.carey@mongodb.com and kelsey.schubert, we may want to backport this (and potentially the linter) to v4.4 to fix malformed LOGV2 IDs before the release. bruce.lucas and billy.donahue, feel free to add more justification on why we would need to backport. |
| Comment by Billy Donahue [ 30/Jun/20 ] |
|
Because it affects asserts as well as LOGV2, it might not be I think this is the better ticket number to use. |
| Comment by Bruce Lucas (Inactive) [ 30/Jun/20 ] |
|
billy.donahue, regarding a linter for this, I guess this would be part of |
| Comment by Bruce Lucas (Inactive) [ 27/Jun/20 ] |
|
As discussed elsewhere, if we can get these fixes in 4.4.0 I think there is no problem. |
| Comment by Billy Donahue [ 26/Jun/20 ] |
|
Might involve a linter to keep new codes looking reasonable. Nothing too fancy, hopefully. |
| Comment by Billy Donahue [ 26/Jun/20 ] |
|
Yes, let's discuss the details. I'd appreciate your input on how far these IDs have propagated. |
| Comment by Bruce Lucas (Inactive) [ 26/Jun/20 ] |
|
Let's please discuss before doing this. Changing log ids has the potential to break downstream code that analyzes logs. It may be better to live with some log ids that don't follow the pattern than to make this breaking change, partly depending on when we make this change. |
| Comment by Billy Donahue [ 26/Jun/20 ] |
|
I tried to find more of them. This only finds those for which the ID is on the same line as LOGV2* though. 33 hits. First one to appear was on 2020-03-05 https://gist.github.com/BillyDonahue/3279d262a89f9ee7047da0b4548b5df0
|