Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce intermittently returns wrong results for 1.3.0-45 #1375

Closed
sethrosetter opened this issue Jul 27, 2016 · 1 comment

Comments

@sethrosetter
Copy link

commented Jul 27, 2016

Using 1.3.0-45, the reduce can return the wrong results for a view query.

Reproduced running cbl-views.js ~ 10 times Using API 22 x86 Nexus 5 emulator.

It will only fail once in a while

# create player docs
# update ddoc with player view
ok 29 can update design doc
# test array keys
ok 30 group level=2 keys length
ok 31 group_level=2 value
ok 32 group true
ok 33 group level=1 keys length
not ok 34 group_level=1 value
  ---
    file:   /Users/sethrosetter/Code/sync-gateway-tests/node_modules/coax/node_modules/hoax/lib/hoax-core.js
    line:   21
    column: 11
    stack:
      - |
        getCaller (/Users/sethrosetter/Code/sync-gateway-tests/node_modules/tap/lib/tap-assert.js:439:17)
      - |
        assert (/Users/sethrosetter/Code/sync-gateway-tests/node_modules/tap/lib/tap-assert.js:21:16)
      - |
        Function.equal (/Users/sethrosetter/Code/sync-gateway-tests/node_modules/tap/lib/tap-assert.js:163:10)
      - |
        Test._testAssert (/Users/sethrosetter/Code/sync-gateway-tests/node_modules/tap/lib/tap-test.js:87:16)
      - |
        /Users/sethrosetter/Code/sync-gateway-tests/tests/cbl-views.js:391:15
      - |
        Request._callback (/Users/sethrosetter/Code/sync-gateway-tests/node_modules/coax/node_modules/hoax/lib/hoax-core.js:21:11)
      - |
        Request.self.callback (/Users/sethrosetter/Code/sync-gateway-tests/node_modules/coax/node_modules/hoax/node_modules/request/main.js:122:22)
      - |
        Request.emit (events.js:98:17)
      - |
        Request.<anonymous> (/Users/sethrosetter/Code/sync-gateway-tests/node_modules/coax/node_modules/hoax/node_modules/request/main.js:661:16)
      - |
        Request.emit (events.js:117:20)
    found:  0
    wanted: 45
  ...


>>>>>>>>>>>>>>>>>>>cbl-views.js Wed Jul 27 2016 15:07:48 GMT-0700 (PDT): 20150ms
# done

1..34
# tests 34
# pass  33
# fail  1

@hideki hideki added the in progress label Jul 27, 2016

@hideki hideki added this to the 1.4.0 milestone Jul 27, 2016

@hideki hideki added the bug label Jul 27, 2016

@hideki hideki self-assigned this Jul 27, 2016

@hideki

This comment has been minimized.

Copy link

commented Jul 27, 2016

Keys and values, which are passed to reducer, are a correct value.

Query test/player: keysToReduce=[[2013, 7, 0], [2013, 7, 1], [2013, 7, 2], [2013, 7, 3], [2013, 7, 4], [2013, 7, 5], [2013, 7, 6], [2013, 7, 7], [2013, 7, 8], [2013, 7, 9]], valuesToReduce=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Query test/player: Reduced to key=[2013], value=50.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.