-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
(copied to CRM)
-
None
-
Major Change
-
None
-
None
-
None
-
None
-
None
-
None
We currently encode someĀ uint Go types (uint, uint32 and uint64) as Int64 in BSON by default. It would probably make more sense to encode them as an Int32 if possible by default. This behavior is controlled by the EncodeToMinSize option on UIntCodec. Interestingly, our mgocompat Registry does have EncodeToMinSize as true by default.
We cannot change the default behavior without breaking current users' code.
Open questions:
- Are there any other operations we should try to encode the minimum size integer, or is it only $inc?