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

When creating filenames from random numbers, use unsigned numbers

    • Storage Execution
    • Fully Compatible
    • ALL
    • Execution Team 2023-10-30, Execution Team 2023-11-13

      There are two places where we currently create files with the pattern "-" + randomInt64(). We do this when generating idents in the catalog that are used in wiredtiger file names, and when generating filenames for the external sorter used during index building. The problem is that if the random number is negative, we end up with two adjacent dashes in the file name. At the very least we should convert the random number to uint64_t prior to stringifying. It may be better to add a nextUInt64() method to RandomBase since unconstrained random "numbers" are just bags of bits anyway, and that is usually better in a unsigned type.

            Assignee:
            daotang.yang@mongodb.com Daotang Yang
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: