Index mutations per Collection

Hi @anonimos

TL;DR;
This is a stats issue. The mutations should not be shared across collections i.e. the mutations on profiles.core.user_profile will not be sent to indexes on profiles.configuration.attribute. You should check other stats at index level like Indexed items and Index data size.

To explain in detail,

When an index is building it gets the data from INIT (initial) stream which operates at collection level. Once the index is moved to ready state it uses MAINT (maintenance) stream to get data from KV which operates at bucket level. This is done to optimise resources during maintenance phase of indexes.

Mutations remaining shown on the UI is difference of the bucket level sequence number in KV and max sequence number seen by indexer. As the index is using MAINT stream the mutations on a collection (profiles.core.user_profile) are increasing the bucket sequence numbers and the same is reflected on index (primary) of another collection (profiles.configuration.attribute) on same bucket as its using bucket level maintenance stream.

We are looking into this issue and will address this stats issue using https://issues.couchbase.com/browse/MB-51161 in later versions.

Please let us know if you are seeing any further issues in this regard.

Thanks
Sai