-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
None
Running python -m sir reindex doesn't always return in musicbrainz-docker.
It never happened in production using nohup.
Steps to reproduce
Install musicbrainz-docker@rmq-sir-solr (related PR) and run as follows:
git clone -b rmq-sir-solr https://github.com/yvanzo/musicbrainz-docker.git cd musicbrainz-docker export COMPOSE_FILE=docker-compose.yml:docker-compose.public.yml:docker-compose.musicbrainz-development.yml docker-compose up -d docker-compose exec musicbrainz /createdb.sh -fetch -sample
Log files
SIR has a debug option but no logging option, its stdout must be captured:
docker-compose exec indexer python -m sir -d reindex \ > reindex-`date -u -Iseconds`.debug.log
Solr has logs that can be more useful to check for activity:
docker-compose logs search
Indexes status
Search indexes can be rebuilt for a specific entity type ~ core as follows:
entity_type=annotation docker-compose exec indexer python -m sir -d reindex --entity-type ${entity_type} \ > reindex-${entity_type}-`date -u -Iseconds`.debug.log
Indexes completion can be checked by comparing for each entity-type ~ core:
- numDocs in core index at http://localhost:8983/solr/#/~cores
- number of entries in the corresponding table
entity_type=annotation docker-compose exec db psql -U musicbrainz -d musicbrainz_db \ -c "COPY(SELECT COUNT(*) FROM ${entity_type}) TO STDOUT"