Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-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 59164193CC for ; Wed, 9 Mar 2016 22:15:41 +0000 (UTC) Received: (qmail 55466 invoked by uid 500); 9 Mar 2016 22:15:41 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 55372 invoked by uid 500); 9 Mar 2016 22:15:41 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 55345 invoked by uid 99); 9 Mar 2016 22:15:41 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Mar 2016 22:15:41 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 051BE2C1F58 for ; Wed, 9 Mar 2016 22:15:41 +0000 (UTC) Date: Wed, 9 Mar 2016 22:15:41 +0000 (UTC) From: "Shawn McKinney (JIRA)" To: dev@directory.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FC-38) Potential issues on synchronized protected elements 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/FC-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15188165#comment-15188165 ] Shawn McKinney commented on FC-38: ---------------------------------- resolved here > Potential issues on synchronized protected elements > --------------------------------------------------- > > Key: FC-38 > URL: https://issues.apache.org/jira/browse/FC-38 > Project: FORTRESS > Issue Type: Bug > Affects Versions: 1.0.0-RC39 > Reporter: Emmanuel Lecharny > Priority: Critical > Fix For: 1.0.0-RC42 > > > There are some classes where we protect a field with a synchronized in order to avoid concurrent modifications. That's ok, except that one should not access the field while it's being updated. There are a few cases where it's done, and this should be fixed. > The way to do it is to use ReentrantReadWriteLock for that : it allows concurrent reads, unless a write lock is taken. Writes will block other writes and all the reads until it's done. > The OrgUnitP and PolicyP are protecting sets while updating it that aren't protected when read (this is fixed for OrgUnitP) > The AdminRoleUtil, HierUtil, PsoUtil, UsoUtil are all manipulating a graph object which is synchronized on update, but not on read. This is probably more complex to fix than for the OrgUnitP/PolicyP classes. -- This message was sent by Atlassian JIRA (v6.3.4#6332)