apache / solr-operator

Official Kubernetes operator for Apache Solr
https://solr.apache.org/operator
Apache License 2.0
243 stars 112 forks source link

Add managed scaleUp for SolrClouds #575

Closed HoustonPutman closed 1 year ago

HoustonPutman commented 1 year ago

Resolves #567

TODO:

Cluster Locking

This is a new lockable clusterOperation as described in #560, and it also changes the scale-down behavior to use its own lock, instead of using a generic "scaling" lock. This is necessary since the scale-down and scale-up logic is very different, and the operator needs to be sure which operation it is trying to accomplish.

Solr Version Compatibility

This feature also requires a new API in Solr: https://issues.apache.org/jira/browse/SOLR-16806, a BalanceReplicas API. This is the first V2 API that the Solr Operator will use. Since the earliest this API will be supported in Solr is 9.3, we need to fail gracefully if the Solr version the user is running does not support this API. The easiest way is to make it opt-in, however given the cluster-locking code we have introduced, we could get in a state where the lock is never given up if the user accidentally opts-in to the feature with an unsupported Solr version. Instead we should try to catch an "unsupported API error" and just do a NO-OP instead.

This is going to be tricky in the integration tests, since we don't know if the Solr version provided will support the API. Ideally we would test that the replicas are spread out after the scale-up, but we can't be sure that they will be.