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

[CDC] Cbstats are showing collections item count as zero (for replica vbuckets)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Major
    • None
    • 7.2.0
    • couchbase-bucket
    • 7.2.0-5189

    Description

      1. Create a 3 node cluster
      2. Create a magma bucket (history_retention_bytes=99636764160, history_retention_seconds=86400 and history_retention_collection_default=false), vbuckets : 1
      3. Create five collections (collection count including default collection is 6 )
      4. Create 9999 items in each of collection
      5. Start upserting all the items
      6. While doc ops(upserts) are going on keep killing memcached at a sleep of 30 to 90 seconds
      7. Delete 3 collections
      8. Recreate the deleted collections(SIGKILLs are still going on)
      9. Observed bucket item count is correct, but item count for all the collections have become zero (Have set the history retention seconds to 60 seconds to clear history as well before checking the cbstats and then reset it back to 86400)

      Cbstats

      [root@localhost ~]# /opt/couchbase/bin/cbstats localhost:11210 -u Administrator -p password -b default all | grep items
       curr_items:                                                0
       curr_items_tot:                                            59994
       curr_temp_items:                                           0
       ep_access_scanner_num_items:                               0
       ep_alog_max_stored_items:                                  1024
       ep_bg_remaining_items:                                     0
       ep_chk_max_items:                                          10000
       ep_diskqueue_items:                                        0
       ep_items_expelled_from_checkpoints:                        0
       ep_items_rm_from_checkpoints:                              285209
       ep_total_del_items:                                        0
       ep_total_new_items:                                        0
       ep_uncommitted_items:                                      0
       ep_warmup_min_items_threshold:                             100
       vb_active_curr_items:                                      0
       vb_pending_curr_items:                                     0
       vb_replica_curr_items:                                     59994
      [root@localhost ~]# /opt/couchbase/bin/cbstats localhost:11210 -u Administrator -p password -b default collections | grep items
       0x0:0x0:items:                 0
       0x0:0x10:items:                0
       0x0:0x11:items:                0
       0x0:0xb:items:                 0
       0x0:0xc:items:                 0
       0x0:0xd:items:                 0
      [root@localhost ~]# /opt/couchbase/bin/cbstats localhost:11210 -u Administrator -p password -b default collections
       0x0:0x0:collections_mem_used:  1959804
       0x0:0x0:data_size:             0
       0x0:0x0:history:               false
       0x0:0x0:items:                 0
       0x0:0x0:name:                  _default
       0x0:0x0:ops_delete:            0
       0x0:0x0:ops_get:               0
       0x0:0x0:ops_store:             0
       0x0:0x0:scope_name:            _default
       0x0:0x10:collections_mem_used: 1959804
       0x0:0x10:data_size:            0
       0x0:0x10:history:              false
       0x0:0x10:items:                0
       0x0:0x10:name:                 FunctionCollection2
       0x0:0x10:ops_delete:           0
       0x0:0x10:ops_get:              0
       0x0:0x10:ops_store:            0
       0x0:0x10:scope_name:           _default
       0x0:0x11:collections_mem_used: 1959804
       0x0:0x11:data_size:            0
       0x0:0x11:history:              false
       0x0:0x11:items:                0
       0x0:0x11:name:                 FunctionCollection3
       0x0:0x11:ops_delete:           0
       0x0:0x11:ops_get:              0
       0x0:0x11:ops_store:            0
       0x0:0x11:scope_name:           _default
       0x0:0xb:collections_mem_used:  1959804
       0x0:0xb:data_size:             0
       0x0:0xb:history:               false
       0x0:0xb:items:                 0
       0x0:0xb:name:                  FunctionCollection4
       0x0:0xb:ops_delete:            0
       0x0:0xb:ops_get:               0
       0x0:0xb:ops_store:             0
       0x0:0xb:scope_name:            _default
       0x0:0xc:collections_mem_used:  1959804
       0x0:0xc:data_size:             0
       0x0:0xc:history:               false
       0x0:0xc:items:                 0
       0x0:0xc:name:                  FunctionCollection5
       0x0:0xc:ops_delete:            0
       0x0:0xc:ops_get:               0
       0x0:0xc:ops_store:             0
       0x0:0xc:scope_name:            _default
       0x0:0xd:collections_mem_used:  1959804
       0x0:0xd:data_size:             0
       0x0:0xd:history:               false
       0x0:0xd:items:                 0
       0x0:0xd:name:                  FunctionCollection1
       0x0:0xd:ops_delete:            0
       0x0:0xd:ops_get:               0
       0x0:0xd:ops_store:             0
       0x0:0xd:scope_name:            _default
       manifest_uid:                  15
       
       
      [root@localhost ~]# /opt/couchbase/bin/magma_dump /data/default/magma.0 --kvstore 0 --docs-by-local
      {"Key":"_local/collections/manifest","Value":{"uid":15}}
      {"Key":"_local/collections/open","Value":{"entries":[{"collectionId":17,"history":false,"maxTtl":0,"name":"FunctionCollection3","scopeId":0,"startSeqno":21353962,"ttlValid":false},{"collectionId":16,"history":false,"maxTtl":0,"name":"FunctionCollection2","scopeId":0,"startSeqno":20933346,"ttlValid":false},{"collectionId":13,"history":false,"maxTtl":0,"name":"FunctionCollection1","scopeId":0,"startSeqno":14211193,"ttlValid":false},{"collectionId":12,"history":false,"maxTtl":0,"name":"FunctionCollection5","scopeId":0,"startSeqno":5,"ttlValid":false},{"collectionId":11,"history":false,"maxTtl":0,"name":"FunctionCollection4","scopeId":0,"startSeqno":4,"ttlValid":false},{"collectionId":0,"history":false,"maxTtl":0,"name":"_default","scopeId":0,"startSeqno":0,"ttlValid":false}]}}
      {"Key":"_local/vbstate","Value":{"checkpoint_type":"Memory","completed_seqno":"0","failover_table":[{"id":184927531648480,"seq":64134264},{"id":219749361384006,"seq":58941175},{"id":199186228065671,"seq":54479112},{"id":134444924891873,"seq":50909489},{"id":26920483433908,"seq":46284439},{"id":96173311783302,"seq":42254636},{"id":58358196110117,"seq":39333786},{"id":269671908106713,"seq":35620311},{"id":126980018825818,"seq":31794322},{"id":92315589218646,"seq":28353492},{"id":245061673407846,"seq":24590299},{"id":102614325693553,"seq":20929470},{"id":164489205413181,"seq":18765907},{"id":198580808433980,"seq":14197446},{"id":187541529412161,"seq":11331984},{"id":36468939137723,"seq":7173069},{"id":47672196751382,"seq":3567538},{"id":111486295001317,"seq":0}],"high_prepared_seqno":"64134264","high_seqno":"64576318","hlc_epoch":"1","max_cas":"1676871726985838593","max_deleted_seqno":"1","max_visible_seqno":"64576318","might_contain_xattrs":false,"namespaces_supported":true,"on_disk_prepare_bytes":"0","on_disk_prepares":"0","prepared_seqno":"0","purge_seqno":"0","snap_end":"64576318","snap_start":"64576318","state":"replica","version":4}}
      {"Key":"|0x0|","Value":{"disk_size":1639836,"high_seqno":64576302,"item_count":9999}}
      {"Key":"|0x10|","Value":{"disk_size":1639938,"high_seqno":64576154,"item_count":9999}}
      {"Key":"|0x11|","Value":{"disk_size":1639938,"high_seqno":64576095,"item_count":9999}}
      {"Key":"|0xb|","Value":{"disk_size":1639938,"high_seqno":64576318,"item_count":9999}}
      {"Key":"|0xc|","Value":{"disk_size":1639938,"high_seqno":64575990,"item_count":9999}}
      {"Key":"|0xd|","Value":{"disk_size":1639938,"high_seqno":64576082,"item_count":9999}}
      

      QE-TEST:

      git fetch https://review.couchbase.org/TAF refs/changes/62/186462/41 && git checkout -b change-186462 FETCH_HEAD
       
      guides/gradlew --refresh-dependencies testrunner -P jython=/opt/jython/bin/jython -P 'args=-i /tmp/temp_vol_2.ini -p bucket_storage=magma,bucket_ram_quota=256,init_loading=False,bucket_eviction_policy=fullEviction,rerun=False -t storage.magma.magma_crash_recovery.MagmaCrashTests.test_crash_during_dedupe,nodes_init=3,skip_cleanup=True,num_items=1000,doc_size=1024,batch_size=100,sdk_timeout=60,log_level=info,infra_log_level=info,key_size=22,num_collections=6,ops_rate=20000,key_type=RandomKey,vbuckets=1,replicas=2,test_itr=3,bucket_history_retention_seconds=86400,bucket_history_retention_bytes=99636764160,standard_buckets=1,magma_buckets=1,num_scopes=1,wipe_history=False,autoCompactionDefined=true,meta_purge_interval=120 -m rest'
      

      Attachments

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

        Activity

          People

            ankush.sharma Ankush Sharma
            ankush.sharma Ankush Sharma
            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