[SERVER-47594] Create LOG(v2) helpers for collection-type objects Created: 16/Apr/20 Updated: 29/Oct/23 Resolved: 05/May/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc7, 4.7.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Daniel Gottlieb (Inactive) | Assignee: | Henrik Edin |
| 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: | Execution Team 2020-05-04, Execution Team 2020-05-18 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
There's a request to standardize that a collection's <database.collection> string representation are logged with the attribute key "namespace". Additionally, it's often useful to have the associated UUID. While it's unlikely we can completely codify that a mistake never happens, the following helpers would go a long way by making it easier to log the right thing than the wrong thing:
The following example API (not the mandated solution) would be easier and safer:
Additionally, some methods don't have collection objects, but `Namespace` objects. Having those transformed (without the UUID component) would also be beneficial. Note there are some more complicated, but uncommon scenarios that may not be worth covering. Such as log lines for renaming collections that can include source/target and temporary collections. The suggested guidance for those cases is to log sourceNamespace and targetNamespace. Having that possible would be a win, but not a requirement. |
| Comments |
| Comment by Githook User [ 18/May/20 ] |
|
Author: {'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}Message:
(cherry picked from commit c65076829b29f977d6412f5309a3b8cf56ce9657) |
| Comment by Henrik Edin [ 15/May/20 ] |
|
Requesting backport so code that uses 'logAttrs' can be backported to v4.4. |
| Comment by Githook User [ 05/May/20 ] |
|
Author: {'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}Message:
|