Search code examples
androidcouchdbcouchbase-lite

Monitoring replication on CouchDB with CouchBase Lite


I have this info about my datable:

{"db_name":"my_table","doc_count":386321,"doc_del_count":112331,"update_seq":3585223,"purge_seq":0,"compact_running":false,"disk_size":10083242115,"data_size":1029825313,"instance_start_time":"1533006878496574","disk_format_version":6,"committed_update_seq":3585328}

About that Json I have been reading on CouchDB site that:

  1. doc_count (number) – A count of the documents in the specified database.
  2. doc_del_count (number) – Number of deleted documents

I am logging the replication itself and using getCompletedChangesCount() method over a replicator I getting always more than doc_count number , so my question is .
Does the replication process replicate the doc_del_count ? In afirmative case? Why? Can I skip those doc_del_count in the replication process? How?


Solution

  • I think this was mostly answered in this related SO post. The short version is you need to track deleted documents, so the count gets added in.

    Normally deleted documents have all properties removed, so the overhead is very small. You can use a deleted document as a kind of archive with a set of properties, although that must be done explicitly.