[
https://issues.apache.org/jira/browse/SOLR-9045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15264027#comment-15264027
]
Christine Poerschke commented on SOLR-9045:
-------------------------------------------
bq. Configuration makes sense to me, but I don't think we should ever
officially support a custom user impl. ...
Okay, that rules out a RecoveryStrategyFactory then, configuration of settings
can be done without a factory.
bq. It'd be nice if this could be more clear as to what a "RecoveryStrategy"
even is; ...
I agree that the name(s) of any new configuration element(s) need not
necessarily match the underlying class names.
[RecoveryStrategy|https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java]
currently has three settings which taken literally could translate into
configuration something like this:
{code}
<recoveryStrategy> <!-- class="solr.RecoveryStrategy" attribute conspicuous by
its absence -->
<int name="waitForUpdatesWithStaleStatePause">7000</int>
<int name="maxRetries">500</int>
<int name="startingRecoveryDelay">5000</int>
</recoveryStrategy>
{code}
How are the settings used?
*
[waitForUpdatesWithStaleStatePause|https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java#L357]'s
code mentions SOLR-7141 for discussion around current value.
*
[startingRecoveryDelay|https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java#L495]
is used to wait for an (exponential) interval between retries.
*
[maxRetries|https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java#L481]
determines how soon "Recovery failed - I give up." happens.
bq. ... We could perhaps do something like UpdateHandler, where you can do it,
but you're crazy to do it unless you check your impl every release and only
have minor changes to behavior (and even then it's crazy).
I agree that configuring something other than the defaults is probably a bit of
a niche use case. Replication via an alternative network interface (SOLR-9044)
e.g. to separate out replication versus regular live within-cloud traffic would
perhaps also be relatively niche (though technically only a minor change to
behaviour) and opt-in to that could be via an additional configuration rather
than a class derived from the existing RecoveryStrategy class.
So, it seems there's three alternatives.
* solrconfig.xml element called <recoveryStrategy> similar to the
<updateHandler> element and as illustrated above
* solrconfig.xml element(s) called something else (similar to the
<updateHandler> element?)
* two additional system properties "solr.cloud.max-retries" and
"solr.cloud.starting-recovery-delay"
("solr.cloud.wait-for-updates-with-stale-state-pause" already exists)
What do you think?
> configurable RecoveryStrategy support
> --------------------------------------
>
> Key: SOLR-9045
> URL: https://issues.apache.org/jira/browse/SOLR-9045
> Project: Solr
> Issue Type: New Feature
> Reporter: Christine Poerschke
> Assignee: Christine Poerschke
> Priority: Minor
>
> objectives:
> * To allow users to change RecoveryStrategy settings such as maxRetries and
> startingRecoveryDelay.
> * To support configuration of a custom recovery strategy.
> illustrative solrconfig.xml snippet:
> {code}
> <recoveryStrategyFactory class="MyCustomRecoveryStrategyFactory">
> <int name="maxRetries">250</int> <!-- DefaultRecoveryStrategy's default is
> 500. -->
> <str name="settingUsedByCustomBehaviour"></str>
> </recoveryStrategyFactory>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]