Enable Debug Logging for Master and Coordination Packages (#46363) (#46374)

In order to track down #46091:
* Enables debug logging in REST tests for `master` and `coordination` packages
since we suspect that issues are caused by failed and then retried publications
This commit is contained in:
Armin Braun 2019-09-05 14:03:38 +02:00 committed by GitHub
parent 5201386232
commit 7a9af874ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 0 deletions

View File

@ -912,6 +912,10 @@ public class ElasticsearchNode implements TestClusterConfiguration {
// Don't wait for state, just start up quickly. This will also allow new and old nodes in the BWC case to become the master
defaultConfig.put("discovery.initial_state_timeout", "0s");
// TODO: Remove these once https://github.com/elastic/elasticsearch/issues/46091 is fixed
defaultConfig.put("logger.org.elasticsearch.action.support.master", "DEBUG");
defaultConfig.put("logger.org.elasticsearch.cluster.coordination", "DEBUG");
HashSet<String> overriden = new HashSet<>(defaultConfig.keySet());
overriden.retainAll(settings.keySet());
overriden.removeAll(OVERRIDABLE_SETTINGS);

View File

@ -19,6 +19,7 @@
package org.elasticsearch.action.admin.cluster.reroute;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.message.ParameterizedMessage;
import org.elasticsearch.ExceptionsHelper;
@ -58,6 +59,8 @@ import java.util.Map;
public class TransportClusterRerouteAction extends TransportMasterNodeAction<ClusterRerouteRequest, ClusterRerouteResponse> {
private static final Logger logger = LogManager.getLogger(TransportClusterRerouteAction.class);
private final AllocationService allocationService;
@Inject

View File

@ -19,6 +19,8 @@
package org.elasticsearch.action.support.master;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.message.ParameterizedMessage;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.ActionListenerResponseHandler;
@ -56,6 +58,8 @@ import java.util.function.Predicate;
public abstract class TransportMasterNodeAction<Request extends MasterNodeRequest<Request>, Response extends ActionResponse>
extends HandledTransportAction<Request, Response> {
protected static final Logger logger = LogManager.getLogger(TransportMasterNodeAction.class);
protected final ThreadPool threadPool;
protected final TransportService transportService;
protected final ClusterService clusterService;