void upgradeTemplates(Map<String, BytesReference> changes, Set<String> deletions) { final AtomicBoolean anyUpgradeFailed = new AtomicBoolean(false); if (threadPool.getThreadContext().isSystemContext() == false) { throw new IllegalStateException("template updates from the template upgrade service should always happen in a system context");
@Override public void handleException(TransportException exp) { assert transportService.getThreadPool().getThreadContext().isSystemContext() == false : "context is a system context"; logger.warn((Supplier<?>) () -> new ParameterizedMessage("fetching nodes from external cluster {} failed", clusterAlias), exp); try { IOUtils.closeWhileHandlingException(connection); } finally { // once the connection is closed lets try the next node collectRemoteNodes(seedNodes, transportService, listener); } }
void upgradeTemplates(Map<String, BytesReference> changes, Set<String> deletions) { final AtomicBoolean anyUpgradeFailed = new AtomicBoolean(false); if (threadPool.getThreadContext().isSystemContext() == false) { throw new IllegalStateException("template updates from the template upgrade service should always happen in a system context");
void upgradeTemplates(Map<String, BytesReference> changes, Set<String> deletions) { final AtomicBoolean anyUpgradeFailed = new AtomicBoolean(false); if (threadPool.getThreadContext().isSystemContext() == false) { throw new IllegalStateException("template updates from the template upgrade service should always happen in a system context");
@Override public void handleResponse(ClusterStateResponse response) { assert transportService.getThreadPool().getThreadContext().isSystemContext() == false : "context is a system context"; try { try (Closeable theConnection = connection) { // the connection is unused - see comment in #collectRemoteNodes