Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-6422

query results returns 300k rows after failing over a node for a bucket with replica=2 when number of items are only 175k

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Critical
    • 2.0-beta
    • None
    • view-engine
    • Security Level: Public
    • None
    • build #1633
      cluster 5 nodes, 4 core VMs

    Description

      Steps to reproduce:
      1.Load data
      Data is loaded by mcsoda, exact command: lib/perf_engines/mcsoda.py 10.3.121.104 vbuckets=1024 doc-gen=0 doc-cache=0 ratio-creates=0.05 min-value-size=1,2 max-items=175146 exit-after-creates=0 threads=10 prefix=test_
      2. create 3 ddocs, 1 view per ddoc:
      view0 function (doc, meta)

      {\n emit(meta.id, doc.category, doc.achievements);\n}

      "}}
      view1 function (doc, meta)

      {\n emit(meta.id, doc.name, doc.coins);\n}

      "}}
      view2 function (doc, meta)

      {\n emit(meta.id, doc.coins);\n}

      ","reduce":"_sum"}}
      2.stop couchbase server on one of the nodes and fail over one node, but don't rebalance cluster
      3.start couchbase server and add node back
      4. query any view. I have 175146 items but total_rows shows view0 -313028, view1-311543, view2-311067

      All queries that i do to all views returns total_rows incorrectly independing on stale parameter, but length of rows list if I do query without limit is correct:

      iryna@ubuntu:~$ curl -v -X GET 'http://10.3.121.104:8092/default/_design/view1/_view/view1?stale=ok&limit=10'

      • About to connect() to 10.3.121.104 port 8092 (#0)
      • Trying 10.3.121.104...
      • connected
      • Connected to 10.3.121.104 (10.3.121.104) port 8092 (#0)
        > GET /default/_design/view1/_view/view1?stale=ok&limit=10 HTTP/1.1
        > User-Agent: curl/7.26.0
        > Host: 10.3.121.104:8092
        > Accept: /
        >
        < HTTP/1.1 200 OK
        < Transfer-Encoding: chunked
        < Server: MochiWeb/1.0 (Any of you quaids got a smint?)
        < Date: Sat, 25 Aug 2012 03:38:54 GMT
        < Content-Type: text/plain;charset=utf-8
        < Cache-Control: must-revalidate
        <
        {"total_rows":311543,"rows":[ {"id":"test_-00003e3b9e533668","key":"test_-00003e3b9e533668","value":"0000 366"}

        ,

        {"id":"test_-000053b1e684c9e7","key":"test_-000053b1e684c9e7","value":"0000 c9e"}

        ,

        {"id":"test_-0000a0f5746d6030","key":"test_-0000a0f5746d6030","value":"0000 603"}

        ,

        {"id":"test_-000109e6bf54b3b2","key":"test_-000109e6bf54b3b2","value":"0001 b3b"}

        ,

        {"id":"test_-0001261e2060303a","key":"test_-0001261e2060303a","value":"0001 303"}

        ,

        {"id":"test_-000163671e7b2952","key":"test_-000163671e7b2952","value":"0001 295"}

        ,

        {"id":"test_-00017961865c4f76","key":"test_-00017961865c4f76","value":"0001 4f7"}

        ,

        {"id":"test_-000183d7295b5898","key":"test_-000183d7295b5898","value":"0001 589"}

        ,

        {"id":"test_-000274f21c484b0e","key":"test_-000274f21c484b0e","value":"0002 4b0"}

        ,

        {"id":"test_-0002ac0d783338cf","key":"test_-0002ac0d783338cf","value":"0002 38c"}

        ]
        }

      • Connection #0 to host 10.3.121.104 left intact
      • Closing connection #0
        iryna@ubuntu:~$ curl -v -X GET 'http://10.3.121.104:8092/default/_design/view1/_view/view1?stale=false&limit=10'
      • About to connect() to 10.3.121.104 port 8092 (#0)
      • Trying 10.3.121.104...
      • connected
      • Connected to 10.3.121.104 (10.3.121.104) port 8092 (#0)
        > GET /default/_design/view1/_view/view1?stale=false&limit=10 HTTP/1.1
        > User-Agent: curl/7.26.0
        > Host: 10.3.121.104:8092
        > Accept: /
        >
        < HTTP/1.1 200 OK
        < Transfer-Encoding: chunked
        < Server: MochiWeb/1.0 (Any of you quaids got a smint?)
        < Date: Sat, 25 Aug 2012 03:39:07 GMT
        < Content-Type: text/plain;charset=utf-8
        < Cache-Control: must-revalidate
        <
        {"total_rows":311543,"rows":[ {"id":"test_-00003e3b9e533668","key":"test_-00003e3b9e533668","value":"0000 366"}

        ,

        {"id":"test_-000053b1e684c9e7","key":"test_-000053b1e684c9e7","value":"0000 c9e"}

        ,

        {"id":"test_-0000a0f5746d6030","key":"test_-0000a0f5746d6030","value":"0000 603"}

        ,

        {"id":"test_-000109e6bf54b3b2","key":"test_-000109e6bf54b3b2","value":"0001 b3b"}

        ,

        {"id":"test_-0001261e2060303a","key":"test_-0001261e2060303a","value":"0001 303"}

        ,

        {"id":"test_-000163671e7b2952","key":"test_-000163671e7b2952","value":"0001 295"}

        ,

        {"id":"test_-00017961865c4f76","key":"test_-00017961865c4f76","value":"0001 4f7"}

        ,

        {"id":"test_-000183d7295b5898","key":"test_-000183d7295b5898","value":"0001 589"}

        ,

        {"id":"test_-000274f21c484b0e","key":"test_-000274f21c484b0e","value":"0002 4b0"}

        ,

        {"id":"test_-0002ac0d783338cf","key":"test_-0002ac0d783338cf","value":"0002 38c"}

        ]
        }

      • Connection #0 to host 10.3.121.104 left intact
      • Closing connection #0

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            FilipeManana Filipe Manana (Inactive)
            iryna iryna
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty