Github user markap14 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/3010#discussion_r219294246
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/coordination/node/NodeClusterCoordinator.java
 ---
    @@ -841,6 +900,34 @@ void notifyOthersOfNodeStatusChange(final 
NodeConnectionStatus updatedStatus, fi
             senderListener.notifyNodeStatusChange(nodesToNotify, message);
         }
     
    +    private void decommissionAsynchronously(final DecommissionMessage 
request, final int attempts, final int retrySeconds) {
    +        final Thread decommissionThread = new Thread(new Runnable() {
    +            @Override
    +            public void run() {
    +                final NodeIdentifier nodeId = request.getNodeId();
    +
    +                for (int i = 0; i < attempts; i++) {
    +                    try {
    +                        senderListener.decommission(request);
    +                        reportEvent(nodeId, Severity.INFO, "Node was 
decommissioned due to " + request.getExplanation());
    +                        return;
    +                    } catch (final Exception e) {
    +                        logger.error("Failed to notify {} that it has been 
decommissioned from the cluster due to {}", request.getNodeId(), 
request.getExplanation());
    --- End diff --
    
    We should probably log the stack trace here as well.


---

Reply via email to