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

Inconsistent response for :9102/api/v1/stats

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • No

    Description

      Reproduce bug:

      1. create a secondary index on a bucket (_default collection)
      2. create another secondary index with the same name as above on a named collection in the same bucket as above but with different scope
      3. create a varied number of documents in _default collection and named collection (say 2 docs in _default collection and 1 doc in the named collection)
      4. Run curl -u Administrator:password http://localhost:9102/api/v1/stats
      5. Continue step 4 for 2-3 times all the responses should be the same.

      Attaching json responses for 2 consecutive requests to /api/v1/stats check
      test_bucket_2:idx_age.items_count in both the responses

      This bug also occurs in the following scenario:

      1. create a bucket with 1 scope and 2 collections
      2. create gsi on collection1 and collection2 with same name
      3. insert varied number of docs in both collections
      4. now hit /api/v1/stats, the response contains only one index info

      create indexes:

      create index idx on default:test_bucket_1.test_scope_1.test_collection_1(name)
      create index idx on default:test_bucket_1.test_scope_1.test_collection_2(name)

      response for <ip>:9102/api/v2/stats:

       
      {
      "indexer":

      { "indexer_state": "Active", "memory_quota": 268435456, "memory_total_storage": 13209600, "memory_used": 169263104, "total_indexer_gc_pause_ns": 143824851 }

      ,
      "test_bucket_1:idx":

      { "avg_drain_rate": 0, "avg_item_size": 40, "avg_scan_latency": 0, "cache_hit_percent": 100, "cache_hits": 1, "cache_misses": 0, "data_size": 561003, "disk_size": 851968, "frag_percent": 38, "initial_build_progress": 100, "items_count": 1, "last_known_scan_time": 0, "memory_used": 324, "num_docs_indexed": 1, "num_docs_pending": 0, "num_docs_queued": 0, "num_items_flushed": 1, "num_pending_requests": 0, "num_requests": 0, "num_rows_returned": 0, "num_scan_errors": 0, "num_scan_timeouts": 0, "recs_in_mem": 1, "recs_on_disk": 0, "resident_percent": 100, "scan_bytes_read": 0, "total_scan_duration": 0 }

      }
       

      Attachments

        1. 2i.png
          2i.png
          86 kB
        2. indexer1.json
          6 kB
        3. indexer2.json
          6 kB
        4. test_bucket_2._default._default.png
          test_bucket_2._default._default.png
          59 kB
        5. test_bucket_2.test_scope_1.test_collection_1_1.png
          test_bucket_2.test_scope_1.test_collection_1_1.png
          53 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hemant.rajput Hemant Rajput
            bhargava.yadavalli Bhargava Yadavalli (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty