CouchDB
  1. CouchDB
  2. COUCHDB-1267

Bignums in views aren't sorted correctly.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.1.1, 1.2
    • Fix Version/s: None
    • Component/s: JavaScript View Server
    • Labels:
      None
    • Skill Level:
      Regular Contributors Level (Easy to Medium)

      Description

      Easily tested by creating a doc and hitting this as a temp view:

      function(doc)

      { emit(["bylatest",-1303085266000], null); emit(["bylatest",-1298817134000], null); emit(["bylatest",-1294536544000], null); emit(["bylatest",-1294505612000], null); emit(["bylatest",-1178704800000], null); }

        Activity

        Jan Lehnardt made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Hide
        Jan Lehnardt added a comment -

        This has been fixed in Erlang R14B04.

        Show
        Jan Lehnardt added a comment - This has been fixed in Erlang R14B04.
        Hide
        Filipe Manana added a comment -

        The corresponding OTP patch landed into OTP's dev branch, which means the fix will be in R14B04 (to be released by early October afaik):

        https://github.com/erlang/otp/commit/262a9af33d3ceb4cb032c434b100cea7d4b0d60e

        I just updated configure.ac to enable the NIF only if the OTP version is > R14B03.
        Leaving this ticket open for a while however.

        Show
        Filipe Manana added a comment - The corresponding OTP patch landed into OTP's dev branch, which means the fix will be in R14B04 (to be released by early October afaik): https://github.com/erlang/otp/commit/262a9af33d3ceb4cb032c434b100cea7d4b0d60e I just updated configure.ac to enable the NIF only if the OTP version is > R14B03. Leaving this ticket open for a while however.
        Hide
        Robert Newson added a comment -

        +1 on disabling/removing this until there's a fix or a workaround. Trunk can be a little broken, from time to time, but this is pretty big.

        Show
        Robert Newson added a comment - +1 on disabling/removing this until there's a fix or a workaround. Trunk can be a little broken, from time to time, but this is pretty big.
        Hide
        Paul Joseph Davis added a comment -

        Simplified test case showing this is in enif_compare/2 is at [1]. I submitted upstream to erlang-bugs at [2].

        Now we need to decide what to do about ejson_compare. For now we should probably disable it until further notice. Unordered views are nobody's friend.

        [1] https://github.com/davisp/enif_cmp_bug
        [2] http://erlang.org/pipermail/erlang-bugs/2011-August/002565.html

        Show
        Paul Joseph Davis added a comment - Simplified test case showing this is in enif_compare/2 is at [1] . I submitted upstream to erlang-bugs at [2] . Now we need to decide what to do about ejson_compare. For now we should probably disable it until further notice. Unordered views are nobody's friend. [1] https://github.com/davisp/enif_cmp_bug [2] http://erlang.org/pipermail/erlang-bugs/2011-August/002565.html
        Hide
        Paul Joseph Davis added a comment -

        Should've also mentioned this was reported by mattopenstack on IRC.

        Show
        Paul Joseph Davis added a comment - Should've also mentioned this was reported by mattopenstack on IRC.
        Paul Joseph Davis created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Paul Joseph Davis
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development