Description
Problem
Regression observed in build 7.0.0-3023.
After backup/restore, indexes all appear to be empty (0 items, 0 resident ratio).
Steps to Reproduce
- Initialize a new server/cluster, only data/query/index nodes required.
- load travel-sample bucket, wait for all indexes to be online
- perform backup with cbbackupmgr
- mkdir /tmp/backup
- /opt/couchbase/bin/cbbackupmgr config --archive /tmp/backup --repo default
- /opt/couchbase/bin/cbbackupmgr backup --archive /tmp/backup --repo default --cluster http://127.0.0.1:8091 --username Administrator --password password
- drop travel-sample bucket
- create empty travel-sample bucket
- perform restore from backup: /opt/couchbase/bin/cbbackupmgr restore --archive /tmp/backup --repo default --cluster http://127.0.0.1:8091 --username Administrator --password password
- build indexes: BUILD INDEX ON `travel-sample` (( SELECT RAW name FROM system:indexes WHERE keyspace_id = 'travel-sample' AND state = 'deferred' ))
Notes
With build 7.0.0-3022, after the BUILD INDEX command, all indexes appears normal, with 100% resident ratio and non-0 number of items. With build 7.0.0-3023, all indexes (with exception of the primary index) appears to be empty, with 0 number of items and 0 resident ratio.
Further more, attempting to create any new secondary index will also result in empty index, e.g.:
CREATE INDEX idx_city_country ON `travel-sample`(city, country)
I've attached screen shot for the indexes tab for both build 3022 and build 3023.