[SERVER-31026] log UUIDs in consistent format Created: 11/Sep/17 Updated: 30/Oct/23 Resolved: 19/Oct/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.0-rc1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Judah Schvimer | Assignee: | Geert Bosch |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Storage 2017-10-23 |
| Participants: |
| Description |
|
UUIDs are sometimes logged as {uuid: BinData(4, E91A2A2690EE4F35A8AADFE0509B319F)}and sometimes logged as e91a2a26-90ee-4f35-a8aa-dfe0509b319f. We should be consistent how we log them so that it's easier to look for them in logs. |
| Comments |
| Comment by Githook User [ 19/Oct/17 ] |
|
Author: {'email': 'geert@mongodb.com', 'name': 'Geert Bosch', 'username': 'GeertBosch'}Message: |
| Comment by Githook User [ 19/Oct/17 ] |
|
Author: {'email': 'geert@mongodb.com', 'name': 'Geert Bosch', 'username': 'GeertBosch'}Message: |
| Comment by Geert Bosch [ 10/Oct/17 ] |
|
The output BinData(4, E91A2A2690EE4F35A8AADFE0509B319F) has nothing to do with the BSON format, but rather is just an ad-hoc string version implemented in BSONElement::toString() in the server. Note that the output is inconsistent with that generated by or accepted by the Mongo shell, or drivers such as the Python driver. These use the UUID('e91a2a26-90ee-4f35-a8aa-dfe0509b319f'). I already have a patch to fix this, so will assign to myself. |
| Comment by Judah Schvimer [ 10/Oct/17 ] |
|
After discussing with geert.bosch, we will go with the dashed format. |
| Comment by Judah Schvimer [ 11/Sep/17 ] |
|
We cannot change the BSON representation, so I recommend we just change UUID::toString() and UUID::parse() to match the all-caps, no-dash BSON representation. |