Skip to content

Commit

Permalink
Remove assertions now that they no longer hold
Browse files Browse the repository at this point in the history
  • Loading branch information
ywelsch committed Jun 13, 2018
1 parent 7b92bdb commit faf152c
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ private void connect(ActionListener<Void> connectListener, boolean forceRun) {

private void forkConnect(final Collection<ActionListener<Void>> toNotify) {
ThreadPool threadPool = transportService.getThreadPool();
assert threadPool.getThreadContext().isSystemContext() == false : "context is a system context";
ExecutorService executor = threadPool.executor(ThreadPool.Names.MANAGEMENT);
executor.submit(new AbstractRunnable() {
@Override
Expand Down Expand Up @@ -451,7 +450,6 @@ void collectRemoteNodes(Iterator<DiscoveryNode> seedNodes,
// due to an already closed connection.
ThreadPool threadPool = transportService.getThreadPool();
ThreadContext threadContext = threadPool.getThreadContext();
assert threadContext.isSystemContext() == false : "context is a system context";
TransportService.ContextRestoreResponseHandler<ClusterStateResponse> responseHandler = new TransportService
.ContextRestoreResponseHandler<>(threadContext.newRestorableContext(false),
new SniffClusterStateResponseHandler(transportService, connection, listener, seedNodes,
Expand Down Expand Up @@ -530,7 +528,6 @@ public ClusterStateResponse newInstance() {

@Override
public void handleResponse(ClusterStateResponse response) {
assert transportService.getThreadPool().getThreadContext().isSystemContext() == false : "context is a system context";
try {
if (remoteClusterName.get() == null) {
assert response.getClusterName().value() != null;
Expand Down Expand Up @@ -570,7 +567,6 @@ public void handleResponse(ClusterStateResponse response) {

@Override
public void handleException(TransportException exp) {
assert transportService.getThreadPool().getThreadContext().isSystemContext() == false : "context is a system context";
logger.warn(() -> new ParameterizedMessage("fetching nodes from external cluster {} failed", clusterAlias), exp);
try {
IOUtils.closeWhileHandlingException(connection);
Expand Down

0 comments on commit faf152c

Please sign in to comment.