Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-998

Ruby driver native support on big endian platform not connecting to MongoD

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Fixed
    • Affects Version/s: bson-3.1.2
    • Fix Version/s: 12_01_17
    • Component/s: BSON
    • Labels:
      None
    • Environment:
      Linux on z/390 (RHEL 6.6/7.1 and SLES 11/12)

      Description

      I built the Ruby MongoDB driver on a Linux Z system (big endian) and have found two issues related to endianness.

      etx/lib/native.c:
      rb_float_to_bson: need to convert from big endian to little endian
      rb_object_id_generator_next: modified to support big endian

      spec/bson/timestamp.rb
      In the "#to_bson/#from_bson" test, the pack as was specified as ("l2") instead of (BSON::Int32::PACK * 2)

      I also encounter 1 issues in the benchmarking code that was generic to all processor architectures. Here the FalseClass was being incorrectly bench marked against a BSON::Binary rather than a BSON::Boolean

      I have built the MongoDB driver on both x86 and z390 with the changes and all test/benchmarks now run successfully through to completion.

      Could you please suggest the next steps to incorporate these changes into an upcoming patch?

      Thanks

        Attachments

          Activity

            People

            Assignee:
            durran.jordan Durran Jordan
            Reporter:
            jblight Jeff Blight
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: