[ https://issues.apache.org/jira/browse/DIRSERVER-2418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lécharny updated DIRSERVER-2418: ----------------------------------------- Fix Version/s: 2.0.0.AM28 > Potential Synchronization Issue At AbstractBTreePartition > ---------------------------------------------------------- > > Key: DIRSERVER-2418 > URL: https://issues.apache.org/jira/browse/DIRSERVER-2418 > Project: Directory ApacheDS > Issue Type: Bug > Affects Versions: 2.0.0.AM27 > Reporter: Mikhail Titov > Priority: Major > Fix For: 2.0.0.AM28 > > > Let's take a look at the > [getSuffixId|https://github.com/apache/directory-server/blob/38e7e2bdb685f71c8f7726197bfbd22cce33ba3a/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java#L2995] > method: > Field *suffixId* has been compared without locking at > [link|https://github.com/apache/directory-server/blob/38e7e2bdb685f71c8f7726197bfbd22cce33ba3a/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java#L2997] > and is assigned under lock at > [link|https://github.com/apache/directory-server/blob/38e7e2bdb685f71c8f7726197bfbd22cce33ba3a/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java#L3004]. > > This potentially may lead to a synchronization error, when many processes > simultaneously pass the check and then reach the lock one by one. > The problem and possible resolve are described in more detail > [here|https://stackoverflow.com/questions/13261300/is-it-okay-to-double-check-before-and-inside-a-lock-before-running-the-code-in#:~:text=The%20first%20method,a%20performance%20issue.] -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@directory.apache.org For additional commands, e-mail: dev-h...@directory.apache.org