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

Spilled sorter files are not safe to use between platforms of differing endianness

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Storage Execution
    • ALL

      Our sorter writes out some integers by using reinterpret_cast, which has different behavior on platforms of different endianness.

      Spilled sorter data is then read back into memory here in a way that that differs based on machine endinaness.

      Sorter files are only used in this way for resumable index builds.

      In practice, this would be a problem in this specific scenario:

      • This server is shut down cleanly during the sort phase of a resumable index build
      • The user takes a filesystem-level snapshot of all data files
      • The user migrates to a platform with different endianness and starts the server the server on those data files

            Assignee:
            Unassigned Unassigned
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: