Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 61AFF186D0 for ; Thu, 14 Jan 2016 11:50:40 +0000 (UTC) Received: (qmail 80512 invoked by uid 500); 14 Jan 2016 11:50:40 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 80481 invoked by uid 500); 14 Jan 2016 11:50:40 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 80470 invoked by uid 99); 14 Jan 2016 11:50:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jan 2016 11:50:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D74452C14F0 for ; Thu, 14 Jan 2016 11:50:39 +0000 (UTC) Date: Thu, 14 Jan 2016 11:50:39 +0000 (UTC) From: "Sandor Magyari (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (AMBARI-14665) Race condition problem in ServiceComponentHostImpl when provisioning cluster with Blueprint MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Sandor Magyari created AMBARI-14665: --------------------------------------- Summary: Race condition problem in ServiceComponentHostImpl when provisioning cluster with Blueprint Key: AMBARI-14665 URL: https://issues.apache.org/jira/browse/AMBARI-14665 Project: Ambari Issue Type: Bug Affects Versions: 2.2.0 Reporter: Sandor Magyari Assignee: Sandor Magyari Fix For: 2.2.1 Sometimes when provisioning cluster with Blueprint, there are state inconsistencies between state and desired_state of components on a given host. Usually desired_state is still INSTALLED while state is STARTED. Analyzing the logs of affected components, the problem seems to be a race condition in ServiceComponentHostImpl. This is modified by ActionScheduler, HeartBeatMonitor and HostComponentResourceProvider as well which is used when creating INSTALL and START tasks, modifying desired states. ServiceComponentHostImpl state is stored in two entities: HostComponentStateEntity, HostComponentDesiredStateEntity. Regardless of changes made both entities are merged back to db but only one is fetched from db before merge. -- This message was sent by Atlassian JIRA (v6.3.4#6332)