https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43142 Bug ID: 43142 Summary: Elasticsearch number_of_replicas should be driven by a system preference Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- Koha's index_config.yaml hardcodes index.number_of_replicas: 1 and index.number_of_shards: 5. On single-node clusters (the vast majority of Koha deployments), this causes a permanently yellow cluster health status because replica shards can never be assigned. The number_of_replicas setting is applied at index creation time during rebuild_elasticsearch.pl. Since this is entirely within Koha's control, it should be configurable via a system preference. Proposed solution: - Add a new system preference ElasticsearchReplicas (default: 0) - rebuild_elasticsearch.pl and any index creation code should read this preference and override the value from index_config.yaml - Default of 0 is sensible because: - Most deployments are single-node - Replicas are only useful with multiple ES nodes - Organizations that run multi-node clusters can set it to 1 or higher - The setting takes effect on rebuild, so changing it is straightforward This also eliminates the confusing yellow cluster health on fresh installs and KTD development environments. Note: The index_config.yaml default could also be changed to 0, with the syspref allowing organizations to increase it. Either approach works, but the syspref is the important part for operational control. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.