From 47d1f011054118b4d24184f8964d24f70dccff21 Mon Sep 17 00:00:00 2001 From: James DeMichele Date: Thu, 9 Mar 2023 13:45:08 -0600 Subject: [PATCH] Fix bug with ES Index and Postgres Index DAOs colliding when both Postgres and Elasticsearch are used in core --- .../conductor/es7/config/ElasticSearchV7Configuration.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index/es7-persistence/src/main/java/com/netflix/conductor/es7/config/ElasticSearchV7Configuration.java b/index/es7-persistence/src/main/java/com/netflix/conductor/es7/config/ElasticSearchV7Configuration.java index e115b42b2..41c08acfd 100644 --- a/index/es7-persistence/src/main/java/com/netflix/conductor/es7/config/ElasticSearchV7Configuration.java +++ b/index/es7-persistence/src/main/java/com/netflix/conductor/es7/config/ElasticSearchV7Configuration.java @@ -28,6 +28,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; import org.springframework.retry.backoff.FixedBackOffPolicy; import org.springframework.retry.support.RetryTemplate; @@ -78,6 +79,7 @@ public RestClientBuilder restClientBuilder(ElasticSearchProperties properties) { return builder; } + @Primary // If you are including this project, it's assumed you want ES to be your indexing mechanism @Bean public IndexDAO es7IndexDAO( RestClientBuilder restClientBuilder,