From 64c480f3e91ab8368ccc59a233e9930ee057c433 Mon Sep 17 00:00:00 2001 From: Andrzej Bialecki Date: Mon, 14 Aug 2017 16:10:37 +0200 Subject: [PATCH] SOLR-11234: TriggerListener registration bug. --- .../org/apache/solr/cloud/autoscaling/AutoScalingHandler.java | 2 +- .../apache/solr/cloud/autoscaling/SystemLogListenerTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/cloud/autoscaling/AutoScalingHandler.java b/solr/core/src/java/org/apache/solr/cloud/autoscaling/AutoScalingHandler.java index b16e9b46635..abd85cfa0da 100644 --- a/solr/core/src/java/org/apache/solr/cloud/autoscaling/AutoScalingHandler.java +++ b/solr/core/src/java/org/apache/solr/cloud/autoscaling/AutoScalingHandler.java @@ -556,7 +556,7 @@ public class AutoScalingHandler extends RequestHandlerBase implements Permission properties.put(AutoScalingParams.TRIGGER, triggerName); properties.put(AutoScalingParams.STAGE, EnumSet.allOf(TriggerEventProcessorStage.class)); AutoScalingConfig.TriggerListenerConfig listener = - new AutoScalingConfig.TriggerListenerConfig(CollectionAdminParams.SYSTEM_COLL, properties); + new AutoScalingConfig.TriggerListenerConfig(triggerName + CollectionAdminParams.SYSTEM_COLL, properties); autoScalingConfig = autoScalingConfig.withTriggerListenerConfig(listener); return autoScalingConfig; } diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/SystemLogListenerTest.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/SystemLogListenerTest.java index c5536dec4e6..2f2da94e2c7 100644 --- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/SystemLogListenerTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/SystemLogListenerTest.java @@ -105,7 +105,7 @@ public class SystemLogListenerTest extends SolrCloudTestCase { // remove default listener String removeListenerCommand = "{\n" + "\t\"remove-listener\" : {\n" + - "\t\t\"name\" : \".system\"\n" + + "\t\t\"name\" : \"node_lost_trigger.system\"\n" + "\t}\n" + "}"; req = createAutoScalingRequest(SolrRequest.METHOD.POST, removeListenerCommand);