https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43142
--- Comment #5 from Tomás Cohen Arazi (tcohen) <[email protected]> --- Created attachment 202395 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202395&action=edit Bug 43142: Make Elasticsearch number_of_replicas driven by a syspref Adds ElasticsearchReplicas system preference (default: 0) which overrides the index.number_of_replicas value from index_config.yaml when creating indexes. The previous hardcoded default of 1 replica caused permanently yellow cluster health on single-node deployments (the majority of Koha installations) because replica shards cannot be assigned without additional nodes. With the default of 0, single-node clusters get green health status immediately after reindexing. Multi-node deployments can set the preference to 1 or higher as needed. Takes effect on next reindex (rebuild_elasticsearch.pl). Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ cd /kohadevbox/koha && perl installer/data/mysql/updatedatabase.pl => SUCCESS: Added new system preference 'ElasticsearchReplicas' 3. Verify default value: k$ koha-mysql kohadev -e "SELECT * FROM systempreferences WHERE variable='ElasticsearchReplicas';" => SUCCESS: value = 0 4. Rebuild indexes: k$ perl misc/search_tools/rebuild_elasticsearch.pl --delete 5. Check cluster health: k$ curl -s http://es:9200/_cluster/health | python3 -m json.tool => SUCCESS: status is green, unassigned_shards is 0 6. Sign off :-D Assisted-by: Sonnet 4 (Anthropic) -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
