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 8985C17681 for ; Tue, 14 Apr 2015 02:46:13 +0000 (UTC) Received: (qmail 25597 invoked by uid 500); 14 Apr 2015 02:46:12 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 25525 invoked by uid 500); 14 Apr 2015 02:46:12 -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 25295 invoked by uid 99); 14 Apr 2015 02:46:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2015 02:46:12 +0000 Date: Tue, 14 Apr 2015 02:46:12 +0000 (UTC) From: "Jonathan Hurley (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMBARI-10456) Ambari Server Deadlock When Mapping Hosts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-10456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Hurley updated AMBARI-10456: ------------------------------------- Attachment: AMBARI-10456.patch > Ambari Server Deadlock When Mapping Hosts > ----------------------------------------- > > Key: AMBARI-10456 > URL: https://issues.apache.org/jira/browse/AMBARI-10456 > Project: Ambari > Issue Type: Bug > Affects Versions: 2.0.0 > Reporter: Jonathan Hurley > Assignee: Jonathan Hurley > Priority: Critical > Fix For: 2.1.0 > > Attachments: AMBARI-10456.patch, dump.txt > > > When mapping hosts concurrently with reading information from a cluster, there was a deadlock between the building the cluster health report and mapping the new hosts. > A few changes to note here: > - ClustersImpl uses concurrent maps; there's really no need to keep the internal lock. I removed it in several places where the cluster is guaranteed to be available (such as when using the ID to retrieve the cluster). The concurrent maps guard against concurrent modifications. > - The Ambari Event Publisher was actually synchronous. This not only caused bottlenecks, but also contributed to a secondary deadlock detected while fixing the original issue. It was changed into a single-threaded asynchronous bus. Consumers of this bus should never rely on it to perform its actions in order to perform their own logic, so changing the behavior seemed correct -- This message was sent by Atlassian JIRA (v6.3.4#6332)