[SERVER-47207] upgrade setParameter & getParameter to logv2::LogComponent Created: 31/Mar/20 Updated: 29/Oct/23 Resolved: 27/Apr/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Logging |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc4, 4.7.0 |
| Type: | Bug | 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 | ||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||||||||||||||
| Sprint: | Service Arch 2020-04-06, Service arch 2020-04-20, Service arch 2020-05-04 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
Adding a logv2::LogComponent::kTest broke the `logComponentV1toV2` for the new logv2-only "test" component. The parse in setParameter generates logger::LogComponent. We shouldn't have to keep logging::LogComponent and logv2::LogComponent in sync. We can convert everything to logv2 and get rid of logComponentV1toV2. The jstests/core/set_param1.js breaks specifically from this effect.
From src/mongo/db/commands/parameters.cpp , using logger::LogComponentSetting; getParameter, which only uses direct properties of logv2::LogComponent, is getting correct logv2 settings. But setParameter, which calls logger::parseLogComponentSettings, is going to use the log v1 parser, which can only generate logger::LogComponent settings, and will not be able to set a kTest. Furthermore, it perfoms v1 to v2 conversion by casts which only use the enum numeric codes, so we aren't really regression-checked against misalignments between v1 and v2 LogComponent and LogSeverity enums. I recommend unifying the v1 and v2 enums, and getting rid of the V1toV2 helpers in src/mongo/logger/log_version_util.h |
| Comments |
| Comment by Githook User [ 30/Apr/20 ] | |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: (cherry picked from commit 7f30f053dff852029e2ca50cc2ab181787ca6da6) | |
| Comment by Githook User [ 30/Apr/20 ] | |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: (cherry picked from commit 74416ee47807741d5e4c7c5f9ce1ef337bd9795c) | |
| Comment by Billy Donahue [ 27/Apr/20 ] | |
|
backport this and all the commits for all the breakout tickets. | |
| Comment by Billy Donahue [ 27/Apr/20 ] | |
|
split-up tickets all resolved. | |
| Comment by Billy Donahue [ 23/Apr/20 ] | |
|
moving to blocked while the fanout of subordinate tickets is incrementally committed. informal completion plan (notes) | |
| Comment by Billy Donahue [ 16/Apr/20 ] | |
| |
| Comment by Githook User [ 13/Apr/20 ] | |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: | |
| Comment by Githook User [ 13/Apr/20 ] | |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: | |
| Comment by Billy Donahue [ 10/Apr/20 ] | |