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

StorageStatistics() returns invalid (0) value for avgItemSize and avgPageSize for collection with small number of documents

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 7.1.0
    • 7.1.0
    • storage-engine
    • Untriaged
    • 1
    • No

    Description

      For a collection with a small number of documents, StorageStatistics() returns 0 value for avgItemSize and avgPageSize. numItems and numPages appears to be correct though.

      insert into default.scope1.coll1 values("key1", {"c1":1, "c2":1});
      insert into default.scope1.coll1 values("key2", {"c1":2, "c2":2});
      insert into default.scope1.coll1 values("key3", {"c1":3, "c2":3});
       
      create index idx1 on default.scope1.coll1(c1,c2);
      update statistics for default.scope1.coll1 index all;
       
      select * from system:dictionary where `bucket` = "default";
       
          "results": [
          {
              "dictionary": {
                  "avgDocKeySize": 4,
                  "avgDocSize": 30426,
                  "bucket": "default",
                  "distributionKeys": [
                      "c2",
                      "c1"
                  ],
                  "docCount": 3,
                  "indexes": [
                      {
                          "indexId": "eb63e08cd3935a39",
                          "indexName": "idx1",
                          "indexStats": [
                              {
                                  "avgItemSize": 0,
                                  "avgPageSize": 0,
                                  "numItems": 3,
                                  "numPages": 1,
                                  "resRatio": 1
                              }
                          ]
                      }
                  ],
                  "keyspace": "coll1",
                  "namespace": "default",
                  "scope": "scope1"
              }
          }
          ],
      

      Note avgItemSize and avgPageSize for idx1 above shows value of 0.

      Attachments

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

        Activity

          People

            sanjit.chauhan Sanjit Chauhan (Inactive)
            bingjie.miao Bingjie Miao
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty