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 4AC9D200D16 for ; Tue, 10 Oct 2017 19:17:54 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 492E0160BE0; Tue, 10 Oct 2017 17:17:54 +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 8F29E1609CB for ; Tue, 10 Oct 2017 19:17:53 +0200 (CEST) Received: (qmail 91324 invoked by uid 500); 10 Oct 2017 17:17:52 -0000 Mailing-List: contact notifications-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list notifications@asterixdb.apache.org Received: (qmail 91315 invoked by uid 99); 10 Oct 2017 17:17:52 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Oct 2017 17:17:52 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id DD0A2C319B for ; Tue, 10 Oct 2017 17:17:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.072 X-Spam-Level: **** X-Spam-Status: No, score=4.072 tagged_above=-999 required=6.31 tests=[MISSING_HEADERS=1.207, REPLYTO_WITHOUT_TO_CC=1.946, SPF_FAIL=0.919] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id I6Pz8yrydqoc for ; Tue, 10 Oct 2017 17:17:49 +0000 (UTC) Received: from vitalstatistix.ics.uci.edu (vitalstatistix.ics.uci.edu [128.195.52.38]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id D332560D9C for ; Tue, 10 Oct 2017 17:17:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vitalstatistix.ics.uci.edu (Postfix) with ESMTP id 70FFF1006E0; Tue, 10 Oct 2017 10:17:48 -0700 (PDT) Date: Tue, 10 Oct 2017 10:17:48 -0700 From: "Michael Blow (Code Review)" Message-ID: Reply-To: mblow@apache.org X-Gerrit-MessageType: newchange Subject: Change in asterixdb[master]: [NO ISSUE][*DB][CLUS] Fix intermittent deadlock on nc join X-Gerrit-Change-Id: I691fc06da3f5641904e02ece8ae1b5fe3fc286a3 X-Gerrit-ChangeURL: X-Gerrit-Commit: 7836aeb8bc13d36b9804aeef0a970586c3b16afa MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.7 archived-at: Tue, 10 Oct 2017 17:17:54 -0000 Michael Blow has uploaded a new change for review. https://asterix-gerrit.ics.uci.edu/2062 Change subject: [NO ISSUE][*DB][CLUS] Fix intermittent deadlock on nc join ...................................................................... [NO ISSUE][*DB][CLUS] Fix intermittent deadlock on nc join Ensure lock on ResourceIdManager is released before obtaining lock on ClusterStateManager, as ClusterStateManager obtains locks on ResourceIdManager Change-Id: I691fc06da3f5641904e02ece8ae1b5fe3fc286a3 --- M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/transaction/ResourceIdManager.java 1 file changed, 12 insertions(+), 8 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/62/2062/1 diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/transaction/ResourceIdManager.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/transaction/ResourceIdManager.java index afa626d..9d5c4c4 100644 --- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/transaction/ResourceIdManager.java +++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/transaction/ResourceIdManager.java @@ -60,16 +60,20 @@ } @Override - public synchronized void report(String nodeId, long maxResourceId) throws HyracksDataException { - if (!allReported) { - globalResourceId.set(Math.max(maxResourceId, globalResourceId.get())); - reportedNodes.add(nodeId); - if (reportedNodes.size() == csm.getNumberOfNodes()) { - reportedNodes = null; - allReported = true; - csm.refreshState(); + public void report(String nodeId, long maxResourceId) throws HyracksDataException { + synchronized (this) { + if (!allReported) { + globalResourceId.set(Math.max(maxResourceId, globalResourceId.get())); + reportedNodes.add(nodeId); + if (reportedNodes.size() == csm.getNumberOfNodes()) { + reportedNodes = null; + allReported = true; + } } } + if (allReported) { + csm.refreshState(); + } } } -- To view, visit https://asterix-gerrit.ics.uci.edu/2062 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I691fc06da3f5641904e02ece8ae1b5fe3fc286a3 Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael Blow