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

Aggregation Suite Failure in server6190.js

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.9
    • Affects Version/s: 3.1.8
    • Component/s: Aggregation Framework
    • Labels:
      None
    • Fully Compatible
    • ALL

      Issue:

      • On ppc64le VM, Aggregation suite is failing with error at line# 20 in server6190.js as
        E QUERY [thread1] Error: [1] != [52] are not equal : undefined :
      • On another VM of mine which is x86, it passed

      Cause:
      I investigated this area of mongodb code by putting logs on both ppc64le as well x86 VMs in
      1. Function int ExpressionWeek::extract(const tm& tm) in src/mongo/db/pipeline/expression.cpp and
      2. function time_t Value::coerceToTimeT() const in src/mongo/db/pipeline/value.cpp
      o This function calls gmtime
      Log output gave me different results as expected. The difference in output of gmtime was exactly 9.5 hrs.

      When I checked system date, I found x86 VM had date in EDT timezone whereas ppc64le has in IST. Difference in IST time and EDT time is also 9.5 hrs.

      Hence, on machines with IST timezone (there could be others timezones too), this test suite fails in calculating week number for given date owing to the difference in current time (milliseconds since epoch time differs for different timezones).

      Solution:
      By changing system timezone and date to EDT on ppc64le, the test case simply passes. Seems the server code and expected output in test case assertions have been written considering EDT or similar timezone.

      Hence, this is a bug which is not specific to ppc64le but a common problem when you've different timezone set.

            Assignee:
            ramon.fernandez@mongodb.com Ramon Fernandez Marina
            Reporter:
            npanpaliya Nishidha
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: