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

outdated entries in active tasks regarding blocked indexers (was: there are blocked indexes after rebalance (only blocked) shown in active_tasks api)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.1.0
    • 2.0-beta, 2.0, 2.0.1
    • view-engine
    • Security Level: Public
    • None

    Description

      test to reproduce:
      -t viewquerytests.ViewQueryTests.test_employee_dataset_startkey_endkey_queries_rebalance_incrementaly,skip_rebalance=true
      -documents are structured as

      {"name": name<string>, "join_yr" : year<int>, "join_mo" : month<int>, "join_day" : day<int>, "email": email<string>, "job_title" : title<string>, "type" : type<string>, "desc" : desc<tring>}

      6 ddoc:
      test_view-983bcaa - 'function (doc)

      { if(doc.job_title !== undefined) emit([doc.join_yr, doc.join_mo, doc.join_day], [doc.name, doc.email] ); }'
      test_view-b30d9d5- 'function (doc) { if(doc.job_title !== undefined) { var myregexp = new RegExp("^System "); if(doc.job_title.match(myregexp)){ emit([doc.join_yr, doc.join_mo, doc.join_day], [doc.name, doc.email] );}}}'
      test_view-bdb0515- 'function (doc) { if(doc.job_title !== undefined) emit([doc.join_yr, doc.join_mo, doc.join_day], [doc.name, doc.email] ); }

      ', reduce=_count
      test_view-c825314- 'function (doc) { if(doc.job_title !== undefined) { var myregexp = new RegExp("^UI "); if(doc.job_title.match(myregexp))

      { emit([doc.join_yr, doc.join_mo, doc.join_day], [doc.name, doc.email] );}}}'
      test_view-f2a786d- 'function (doc) { if(doc.job_title !== undefined) { var myregexp = new RegExp("^Senior "); if(doc.job_title.match(myregexp)){ emit([doc.join_yr, doc.join_mo, doc.join_day], [doc.name, doc.email] );}

      }}'
      test_view-f2f647f- 'function (doc, meta) { if(doc.job_title !== undefined) { var myregexp = new RegExp("^admin"); if(meta.id.match(myregexp))

      { emit([doc.join_yr, doc.join_mo, doc.join_day], [doc.name, doc.email] );}

      }}'

      test start load and queries, load finishes and rebalance starts

      Rebalance finishes successfully, but there are blocked indexes for one ddoc. Those indexes was started on 3% of rebalance progress. Rebalance is finished but indexes can remain blocked for 1-2 days(I just the test) Queries with stale=false return correct result, all items are correct

      iryna@ubuntu:~$ curl 'http://10.3.3.28:8092/_active_tasks' | json_xs
      % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      100 965 100 965 0 0 1111 0 -::- -::- -::- 1455
      [

      { "waiting" : 0, "started_on" : 1362560266, "pid" : "<0.222.0>", "type" : "couch_main_index_barrier", "running" : 0, "limit" : 4, "updated_on" : 1362568344 }

      ,

      { "waiting" : 0, "started_on" : 1362560266, "pid" : "<0.223.0>", "type" : "couch_replica_index_barrier", "running" : 0, "limit" : 2, "updated_on" : 1362568209 }

      ,

      { "indexer_type" : "main", "started_on" : 1362561415, "updated_on" : 1362561415, "design_documents" : [ "_design/test_view-983bcaa" ], "pid" : "<0.16051.0>", "signature" : "2ed558a6a48acf711df25e60a1c45468", "type" : "blocked_indexer", "set" : "default" }

      ,

      { "indexer_type" : "main", "started_on" : 1362565678, "updated_on" : 1362565678, "design_documents" : [ "_design/test_view-983bcaa" ], "pid" : "<0.28747.7>", "signature" : "2ed558a6a48acf711df25e60a1c45468", "type" : "blocked_indexer", "set" : "default" }

      ,

      { "indexer_type" : "main", "started_on" : 1362567729, "updated_on" : 1362567729, "design_documents" : [ "_design/test_view-983bcaa" ], "pid" : "<0.24910.17>", "signature" : "2ed558a6a48acf711df25e60a1c45468", "type" : "blocked_indexer", "set" : "default" }

      ]

      iryna@ubuntu:~$ curl -v 'http://10.3.3.28:8091/pools/default/rebalanceProgress' -u Administrator
      Enter host password for user 'Administrator':

      • About to connect() to 10.3.3.28 port 8091 (#0)
      • Trying 10.3.3.28...
      • connected
      • Connected to 10.3.3.28 (10.3.3.28) port 8091 (#0)
      • Server auth using Basic with user 'Administrator'
        > GET /pools/default/rebalanceProgress HTTP/1.1
        > Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==
        > User-Agent: curl/7.26.0
        > Host: 10.3.3.28:8091
        > Accept: /
        >
        < HTTP/1.1 200 OK
        < Server: Couchbase Server 2.0.1-171-rel-enterprise
        < Pragma: no-cache
        < Date: Wed, 06 Mar 2013 13:38:49 GMT
        < Content-Type: application/json
        < Content-Length: 17
        < Cache-Control: no-cache
        <
      • Connection #0 to host 10.3.3.28 left intact {"status":"none"}

        * Closing connection #0
        iryna@ubuntu:~$

      attaching logs

      Attachments

        For Gerrit Dashboard: MB-7873
        # Subject Branch Project Status CR V

        Activity

          People

            iryna iryna
            iryna iryna
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty