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 0865A200C4C for ; Tue, 4 Apr 2017 18:06:37 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 07128160B90; Tue, 4 Apr 2017 16:06:37 +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 730DD160B81 for ; Tue, 4 Apr 2017 18:06:36 +0200 (CEST) Received: (qmail 74941 invoked by uid 500); 4 Apr 2017 16:06:35 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 74928 invoked by uid 99); 4 Apr 2017 16:06:35 -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, 04 Apr 2017 16:06:35 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3353EDFCB3; Tue, 4 Apr 2017 16:06:35 +0000 (UTC) From: rafaelweingartner To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request #1935: CLOUDSTACK-9764: Delete domain failure due to... Content-Type: text/plain Message-Id: <20170404160635.3353EDFCB3@git1-us-west.apache.org> Date: Tue, 4 Apr 2017 16:06:35 +0000 (UTC) archived-at: Tue, 04 Apr 2017 16:06:37 -0000 Github user rafaelweingartner commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1935#discussion_r102538324 --- Diff: server/src/com/cloud/user/DomainManagerImpl.java --- @@ -109,6 +112,20 @@ @Inject MessageBus _messageBus; + static boolean rollBackState = false; --- End diff -- @nvazquez I have been thinking about this variable you introduced here. I think it can cause problems (concurrency problems). The `DomainManagerImpl` is a singleton. Therefore, it should not have state variables. The `rollBackState ` is acting as a state variable for requests that use `com.cloud.user.DomainManagerImpl.deleteDomain(DomainVO, Boolean)`. The problem is that every call should have its own context/state for `rollBackState`. However, this will not happen with the current implementation. I think we should re-work the use of that variable. What do you think? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---