[SERVER-47933] logv2: detect attribute collisions Created: 04/May/20 Updated: 29/Oct/23 Resolved: 07/Jul/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.1, 4.7.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Billy Donahue | Assignee: | Billy Donahue |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||
| Sprint: | Service arch 2020-05-18, Service arch 2020-06-01, Service arch 2020-06-15, Service arch 2020-06-29 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 30 | ||||||||||||
| Description |
|
Without a check, we could be emitting invalid json as log statements. Hopefully this can be a static check for the majority of LOGV2 statements. |
| Comments |
| Comment by Githook User [ 19/Aug/20 ] |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: Recommit: handle pre-init testing proctor (cherry picked from commit 07deced6b3fa2f5927bb33bd4940cc60d6bc4607) |
| Comment by Billy Donahue [ 02/Jul/20 ] |
|
PoC on a compile-time check, for reference. https://mongodbcr.appspot.com/595650004/ need better constexpr access to the ""_attr arguments to go all the way. |
| Comment by Githook User [ 01/Jul/20 ] |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: Recommit: handle pre-init testing proctor |
| Comment by Githook User [ 01/Jul/20 ] |
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: Revert " This reverts commit 8b2211d9a7b52a3ff951e9043966bbca3c555c30. |
| Comment by Githook User [ 30/Jun/20 ] |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: |
| Comment by Billy Donahue [ 26/Jun/20 ] |
| Comment by Billy Donahue [ 26/Jun/20 ] |
|
Another potential wrinkle here. We want our logs to be valid JSON. The point of this ticket is that an object with duplicate keys is invalid JSON. We can write some code here to catch mistakes in our "key"_attr syntax in LOGV2 statements. That's all good. But to be really airtight, we'd have to also check the structure of the objects we attach to those attribute keys. BSONObj values might still potentially have duplicate keys, and we might need a strategy for handling those. |