From 5fdae8ba10f45784e9c897883d19bdcc5e169942 Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Mon, 9 Sep 2013 14:10:16 +0200 Subject: [PATCH] Restored log lines to TRACE for notification post alias creation and open/close index Introduced specific log level for those in OpenCloseIndexTests#testCloseOpenAliasMultipleIndices --- .../cluster/metadata/MetaDataIndexAliasesService.java | 4 ++-- .../cluster/metadata/MetaDataIndexStateService.java | 4 ++-- .../test/integration/indices/state/OpenCloseIndexTests.java | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexAliasesService.java b/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexAliasesService.java index b9518de346b..619f598e3bd 100644 --- a/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexAliasesService.java +++ b/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexAliasesService.java @@ -257,11 +257,11 @@ public class MetaDataIndexAliasesService extends AbstractComponent { @Override public void onAliasesUpdated(NodeAliasesUpdatedAction.NodeAliasesUpdatedResponse response) { if (version <= response.version()) { - logger.debug("Received NodeAliasesUpdatedResponse with version [{}] from [{}]", response.version(), response.nodeId()); + logger.trace("Received NodeAliasesUpdatedResponse with version [{}] from [{}]", response.version(), response.nodeId()); if (countDown.decrementAndGet() == 0) { aliasOperationPerformedAction.remove(this); if (notified.compareAndSet(false, true)) { - logger.debug("NodeAliasUpdated was acknowledged by all expected nodes, returning"); + logger.trace("NodeAliasUpdated was acknowledged by all expected nodes, returning"); listener.onResponse(new Response(true)); } } diff --git a/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateService.java b/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateService.java index 5cecca57232..646863232a5 100644 --- a/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateService.java +++ b/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateService.java @@ -288,11 +288,11 @@ public class MetaDataIndexStateService extends AbstractComponent { @Override public void onIndexStateUpdated(NodeIndicesStateUpdatedAction.NodeIndexStateUpdatedResponse response) { if (version <= response.version()) { - logger.debug("Received NodeIndexStateUpdatedResponse with version [{}] from [{}]", response.version(), response.nodeId()); + logger.trace("Received NodeIndexStateUpdatedResponse with version [{}] from [{}]", response.version(), response.nodeId()); if (countDown.decrementAndGet() == 0) { indicesStateUpdatedAction.remove(this); if (notified.compareAndSet(false, true)) { - logger.debug("NodeIndexStateUpdated was acknowledged by all expected nodes, returning"); + logger.trace("NodeIndexStateUpdated was acknowledged by all expected nodes, returning"); listener.onResponse(new Response(true)); } } diff --git a/src/test/java/org/elasticsearch/test/integration/indices/state/OpenCloseIndexTests.java b/src/test/java/org/elasticsearch/test/integration/indices/state/OpenCloseIndexTests.java index 32ed4665629..8f5985088c1 100644 --- a/src/test/java/org/elasticsearch/test/integration/indices/state/OpenCloseIndexTests.java +++ b/src/test/java/org/elasticsearch/test/integration/indices/state/OpenCloseIndexTests.java @@ -29,6 +29,7 @@ import org.elasticsearch.action.support.IgnoreIndices; import org.elasticsearch.client.Client; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.indices.IndexMissingException; +import org.elasticsearch.junit.annotations.TestLogging; import org.elasticsearch.test.integration.AbstractSharedClusterTest; import org.junit.Test; @@ -251,7 +252,7 @@ public class OpenCloseIndexTests extends AbstractSharedClusterTest { assertIndexIsOpened("test1"); } - @Test + @Test @TestLogging("org.elasticsearch.cluster.metadata:TRACE") public void testCloseOpenAliasMultipleIndices() { Client client = client(); createIndex("test1", "test2");