ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc1023
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • Fully Compatible
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The aggregation multiversion fuzzer generated a `$accumulator` whose JavaScript state called comparatorless `Array.sort()` on heterogeneous values containing BSON `Date` objects.

      JavaScript's default array sort implicitly stringifies values. `Date.toString()` uses the host's local timezone, causing different result ordering between legacy MozJS and the MongoDB 9.0 WASM-based JavaScript engine. This caused the failure reported in BF-45664(https://jira.mongodb.org/browse/BF-45664).

      Update the aggregation fuzzer so generated queries do not depend on implicit local-time `Date` stringification. In particular, avoid generating comparatorless sorts over values that may contain Dates, or generate an explicit timezone-independent comparison instead.

      The change should be limited to fuzzer generation. Do not change server-side JavaScript compatibility behavior as part of this ticket.

      Acceptance Criteria

      • The aggregation fuzzer no longer generates comparatorless JavaScript `Array.sort()` calls over heterogeneous values that may contain `Date` objects.
      • Any generated Date comparisons or serializations use timezone-independent behavior, such as `getTime()` or `toISOString()`, with an explicit comparator where needed.
      • Add a regression test covering the previously failing generated pattern.
      • Verify the regression test produces identical results under UTC and a non-UTC timezone.
      • Confirm the existing aggregation fuzzer coverage remains enabled for timezone-aware MQL date operators.
      • Link BF-45664(https://jira.mongodb.org/browse/BF-45664).

            Assignee:
            Neil Veira
            Reporter:
            Lee Maguire
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: