AlertManager#stop() didn't stop, the expected and update was reversed in compareAndSet

Original commit: elastic/x-pack-elasticsearch@5b001af292
This commit is contained in:
Martijn van Groningen 2014-11-05 16:13:22 +01:00
parent 5a957ed678
commit b07b0d497d
2 changed files with 24 additions and 24 deletions

46
pom.xml
View File

@ -63,29 +63,6 @@
<version>1.1.1</version> <version>1.1.1</version>
</dependency> </dependency>
<!-- Provided dependencies -->
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>${elasticsearch.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>${lucene.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.3.2</version>
<scope>provided</scope>
</dependency>
<!-- Test dependencies --> <!-- Test dependencies -->
<dependency> <dependency>
@ -124,6 +101,29 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- Provided dependencies -->
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>${elasticsearch.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>${lucene.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.3.2</version>
<scope>provided</scope>
</dependency>
</dependencies> </dependencies>
<repositories> <repositories>
<repository> <repository>

View File

@ -135,7 +135,7 @@ public class AlertManager extends AbstractComponent {
} }
public void stop() { public void stop() {
if (started.compareAndSet(false, true)) { if (started.compareAndSet(true, false)) {
scheduler.stop(); scheduler.stop();
alertsStore.stop(); alertsStore.stop();
actionManager.stop(); actionManager.stop();