Addresses https://github.com/ParsePlatform/flashback/issues/31 - which affects $hint, $orderby, $nearSphere, $geoWithin, etc - basically anytime mongo cares about ordering of keys in an operation. This is caused by two things:
1) when python dumps to JSON, keys are written alphabetically, which can break ordering
2) Ordering of go maps is non-deterministic, thus when we unmarshal JSON into a map, we sometimes lose order.
By switching to BSON as the recording format, we can write documents in their original order in the record tool and unmarshal into bson.D objects and preserve order in the replay tool.
Addresses https://github.com/ParsePlatform/flashback/issues/31 - which affects $hint, $orderby, $nearSphere, $geoWithin, etc - basically anytime mongo cares about ordering of keys in an operation. This is caused by two things:
1) when python dumps to JSON, keys are written alphabetically, which can break ordering 2) Ordering of go maps is non-deterministic, thus when we unmarshal JSON into a map, we sometimes lose order.
By switching to BSON as the recording format, we can write documents in their original order in the record tool and unmarshal into bson.D objects and preserve order in the replay tool.