From 6c53ea444321018f60429fc0bb5598dd91445386 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Wed, 25 Nov 2015 12:34:50 +0000
Subject: [PATCH] OPENDJ-2422: Allow to have a configurable limit for Scope cursoring. The limit is now set to the min between the backend index entry limit and the lookthrough limit. If the backend has unlimited index entry limit (value of 0), we use the cursoring limit for indexes (100 000).
---
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/EntryContainer.java | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/EntryContainer.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/EntryContainer.java
index 85da13d..895b0ed 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/EntryContainer.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/EntryContainer.java
@@ -127,8 +127,6 @@
{
private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
- /** Number of EntryID to considers when building EntryIDSet from DN2ID. */
- private static final int SCOPE_IDSET_LIMIT = 4096;
/** The name of the entry tree. */
private static final String ID2ENTRY_TREE_NAME = ID2ENTRY_INDEX_NAME;
/** The name of the DN tree. */
@@ -827,8 +825,10 @@
if (!isBelowFilterThreshold(entryIDSet))
{
final int lookThroughLimit = searchOperation.getClientConnection().getLookthroughLimit();
+ final int indexLimit =
+ config.getIndexEntryLimit() == 0 ? CURSOR_ENTRY_LIMIT : config.getIndexEntryLimit();
final int idSetLimit =
- lookThroughLimit == 0 ? SCOPE_IDSET_LIMIT : Math.min(SCOPE_IDSET_LIMIT, lookThroughLimit);
+ lookThroughLimit == 0 ? indexLimit : Math.min(indexLimit, lookThroughLimit);
final EntryIDSet scopeSet = getIDSetFromScope(txn, aBaseDN, searchScope, idSetLimit);
entryIDSet.retainAll(scopeSet);
--
Gitblit v1.10.0