Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 7.1, 8.0
    • SolrCloud

    Description

      Implement set-trigger and remove-trigger API to add, update and remove triggers for autoscaling.

      The following events are supported:

      1. nodeAdded
      2. nodeLost
      3. replicaLost
      4. schedule
      5. searchRate
      6. indexRate

      Each trigger has the following properties:

      1. ‘name’ - a unique string to identify the trigger so that it can be read, updated or removed later
      2. ‘state’ - the state of the event (ENABLED or DISABLED), default is ENABLED. This allows one to add a trigger which is disabled until a RESUME_TRIGGER API is called.
      3. ‘actions’ - a list of actions to be performed in the order specified. The default list of actions for every trigger are to compute the plan, execute the plan and save the plan. If an empty list of actions is explicitly specified or null is specified when creating/updating the trigger then no actions are performed at all.

      Here's an example of an API invocation:

      {
      	"set-trigger" : {
      		"name" : "node_lost_trigger",
      		"event" : "nodeLost",
      		"waitFor" : "10m",
      		"state" : "ENABLED",
      		"actions" : [
      			{
      				"name" : "compute_plan",
      				"class" : "solr.ComputePlanAction"
      			},
      			{
      				"name" : "execute_plan",
      				"class" : "solr.ExecutePlanAction"
      			},
      			{
      				"name" : "log_plan",
      				"class" : "solr.LogPlanAction",
      				"collection" : ".system"
      			}
      		]
      	}
      }
      

      Note this issue is only about implementation of the user-facing APIs and not the actual trigger mechanism itself.

      Attachments

        1. SOLR-10339.patch
          27 kB
          Shalin Shekhar Mangar
        2. SOLR-10339.patch
          33 kB
          Shalin Shekhar Mangar

        Activity

          People

            shalin Shalin Shekhar Mangar
            shalin Shalin Shekhar Mangar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: