| | |
| | | AbstractTransaction txn = new AbstractTransaction(rootContainer); |
| | | try { |
| | | // Fetch the base entry. |
| | | long baseEntryID = 0; |
| | | Entry baseEntry = null; |
| | | baseEntry = dn2id.get(txn, baseDN, NdbOperation.LockMode.LM_Read); |
| | | |
| | |
| | | message, matchedDN, null); |
| | | } |
| | | |
| | | baseEntryID = (Long) baseEntry.getAttachment(); |
| | | |
| | | if (!manageDsaIT) { |
| | | checkTargetForReferral(baseEntry, searchScope); |
| | | } |
| | |
| | | |
| | | indexFilter.scan(); |
| | | try { |
| | | long eid = indexFilter.getNext(); |
| | | |
| | | while (eid != 0) { |
| | | long eid = 0; |
| | | while ((eid = indexFilter.getNext()) != 0) { |
| | | if (lookthroughLimit > 0 && lookthroughCount > lookthroughLimit) { |
| | | //Lookthrough limit exceeded |
| | | // Lookthrough limit exceeded |
| | | searchOperation.setResultCode(ResultCode.ADMIN_LIMIT_EXCEEDED); |
| | | searchOperation.appendErrorMessage( |
| | | NOTE_NDB_LOOKTHROUGH_LIMIT_EXCEEDED.get(lookthroughLimit)); |
| | | return; |
| | | } |
| | | |
| | | // Skip over base entry. |
| | | if (eid == baseEntryID) { |
| | | continue; |
| | | } |
| | | |
| | | // Fetch the candidate entry from the database. |
| | | Entry entry = null; |
| | | AbstractTransaction subTxn = new AbstractTransaction(rootContainer); |
| | |
| | | } |
| | | |
| | | searchOperation.checkIfCanceled(false); |
| | | |
| | | // Move to the next record. |
| | | eid = indexFilter.getNext(); |
| | | } |
| | | } finally { |
| | | indexFilter.close(); |
| | |
| | | |
| | | while (result != null) { |
| | | if (lookthroughLimit > 0 && lookthroughCount > lookthroughLimit) { |
| | | //Lookthrough limit exceeded |
| | | // Lookthrough limit exceeded |
| | | searchOperation.setResultCode(ResultCode.ADMIN_LIMIT_EXCEEDED); |
| | | searchOperation.appendErrorMessage( |
| | | NOTE_NDB_LOOKTHROUGH_LIMIT_EXCEEDED.get(lookthroughLimit)); |