Skip to content

Commit 8678ef7

Browse files
committed
Fix for DIRSERVER-2418, thanks to Mikhail Titov for his report.
1 parent 38e7e2b commit 8678ef7

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,18 @@ public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
12741274
}
12751275
}
12761276

1277-
return fetch( partitionTxn, id, lookupContext.getDn() );
1277+
Entry result = fetch( partitionTxn, id, lookupContext.getDn() );
1278+
1279+
if ( result == null )
1280+
{
1281+
System.out.println( "Entry not found!!!" );
1282+
}
1283+
else
1284+
{
1285+
System.out.println( "Entry found:" + result.getDn() );
1286+
}
1287+
1288+
return result;
12781289
}
12791290
catch ( Exception e )
12801291
{
@@ -3001,7 +3012,11 @@ public String getSuffixId( PartitionTxn partitionTxn ) throws LdapException
30013012
try
30023013
{
30033014
rwLock.readLock().lock();
3004-
suffixId = rdnIdx.forwardLookup( partitionTxn, key );
3015+
3016+
if ( suffixId == null )
3017+
{
3018+
suffixId = rdnIdx.forwardLookup( partitionTxn, key );
3019+
}
30053020
}
30063021
finally
30073022
{

0 commit comments

Comments
 (0)