Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DC3E7200C8C for ; Tue, 6 Jun 2017 15:32:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DAE37160BD3; Tue, 6 Jun 2017 13:32:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2CE25160BC3 for ; Tue, 6 Jun 2017 15:32:23 +0200 (CEST) Received: (qmail 50570 invoked by uid 500); 6 Jun 2017 13:32:22 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 50543 invoked by uid 99); 6 Jun 2017 13:32:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jun 2017 13:32:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DE1E3DFC2E; Tue, 6 Jun 2017 13:32:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: magyari_sandor@apache.org To: commits@ambari.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-21168. Deleting host from cluster leaves Ambari in inconsistent state (intermittently) (magyari_sandor) Date: Tue, 6 Jun 2017 13:32:20 +0000 (UTC) archived-at: Tue, 06 Jun 2017 13:32:24 -0000 Repository: ambari Updated Branches: refs/heads/branch-2.5 54ce6cca4 -> 9ed6d843e AMBARI-21168. Deleting host from cluster leaves Ambari in inconsistent state (intermittently) (magyari_sandor) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9ed6d843 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9ed6d843 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9ed6d843 Branch: refs/heads/branch-2.5 Commit: 9ed6d843e929c37314560200555bbab48cc02e2b Parents: 54ce6cc Author: Sandor Magyari Authored: Fri Jun 2 15:38:06 2017 +0200 Committer: Sandor Magyari Committed: Tue Jun 6 15:31:47 2017 +0200 ---------------------------------------------------------------------- .../server/state/svccomphost/ServiceComponentHostImpl.java | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/9ed6d843/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java index 4d034f6..0ff4dad 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java @@ -862,6 +862,7 @@ public class ServiceComponentHostImpl implements ServiceComponentHost { } @Override + @Transactional public void setState(State state) { stateMachine.setCurrentState(state); HostComponentStateEntity stateEntity = getStateEntity(); @@ -890,6 +891,7 @@ public class ServiceComponentHostImpl implements ServiceComponentHost { } @Override + @Transactional public void setVersion(String version) { HostComponentStateEntity stateEntity = getStateEntity(); if (stateEntity != null) { @@ -917,6 +919,7 @@ public class ServiceComponentHostImpl implements ServiceComponentHost { } @Override + @Transactional public void setSecurityState(SecurityState securityState) { HostComponentStateEntity stateEntity = getStateEntity(); if (stateEntity != null) { @@ -966,6 +969,7 @@ public class ServiceComponentHostImpl implements ServiceComponentHost { * @param upgradeState the upgrade state */ @Override + @Transactional public void setUpgradeState(UpgradeState upgradeState) { HostComponentStateEntity stateEntity = getStateEntity(); if (stateEntity != null) { @@ -994,6 +998,7 @@ public class ServiceComponentHostImpl implements ServiceComponentHost { @Override + @Transactional public void handleEvent(ServiceComponentHostEvent event) throws InvalidStateTransitionException { if (LOG.isDebugEnabled()) {