Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-91530

Fix sbe KeyString serialization/deserialization on BigEndian arch

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc9
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • ALL
    • v8.0
    • QE 2024-06-24
    • 0

      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.

            Assignee:
            ivan.fefer@mongodb.com Ivan Fefer
            Reporter:
            ivan.fefer@mongodb.com Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: