In SBE when we spill to disk KeyString values, we do this using this serialize/deserialize function pair:
https://github.com/mongodb/mongo/blob/94a68601ad4819bd7942c581f7da6266b96d740c/src/mongo/db/exec/sbe/values/key_string_entry.cpp#L57
It writes using BufBuilder::appendNum function that tags everything with little endian:
https://github.com/mongodb/mongo/blob/94a68601ad4819bd7942c581f7da6266b96d740c/src/mongo/bson/util/builder.h#L516
But it reads data using generic read() that doesn't account for endianness.
- related to
-
SERVER-29775 DataView and BufReader should either default to LittleEndian or require explicit endianness
- Open