You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2024/08/01 21:55:09 UTC

(directory-server) branch master updated: Fix for DIRSERVER-2410

This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-server.git


The following commit(s) were added to refs/heads/master by this push:
     new 17df506cba Fix for DIRSERVER-2410
17df506cba is described below

commit 17df506cba700bbc80349fd7c40b475c34ede00f
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Thu Aug 1 23:52:49 2024 +0200

    Fix for DIRSERVER-2410
---
 .../core/partition/impl/btree/AbstractBTreePartition.java     | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java b/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
index 95fd0c01aa..a8ad3fe81c 100644
--- a/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
+++ b/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
@@ -2805,14 +2805,11 @@ public abstract class AbstractBTreePartition extends AbstractPartition implement
         {
             rwLock.readLock().lock();
 
-            if ( entryDnCache != null )
+            Dn cachedDn = entryDnCache.getIfPresent( id );
+            
+            if ( cachedDn != null )
             {
-                Dn cachedDn = entryDnCache.getIfPresent( id );
-                
-                if ( cachedDn != null )
-                {
-                    return cachedDn;
-                }
+                return cachedDn;
             }
             
             do