Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-13686

Decouple Autoscaling triggers from the actions they execute

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 8.0
    • Fix Version/s: None
    • Component/s: AutoScaling
    • Labels:

      Description

      Each of the SolrCloud Autoscaling triggers have default aboveOp/belowOp actions, but in some cases, the trigger is becoming too tightly coupled with its associated actions. This could be considered an abstraction violation, as the trigger's compute and execute actions should be separate from the trigger itself.

      My proposal is to separate all action-specific configs out of the existing triggers, and instead do the following:

      1. Require that all trigger actions have a Validator, which ensures that the properties map contains valid values
      2. During trigger configuration, pass in a properties map (essentially a JSON blob), an action name, and its associated validator
        1. Run the validator against the given properties to ensure that the trigger can run without encountering exceptions

      For example, we would make the IndexSizeTrigger action-agnostic, and remove all shard split parameters from the trigger. When we configure the trigger, we could instead pass in the desired action (e.g. shard split), the parameters for that action (e.g. splitByPrefix, splitFuzz, etc.) in a map, and a validator for that action (e.g. code to ensure that the parameters passed in have valid values; such checks are currently hard-coded into the trigger configuration). 

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              megancarey Megan Carey
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: