From 24d7fab5d25b8988b3aeb03e0645707f93d1415b Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Tue, 27 May 2008 07:22:59 +0000
Subject: [PATCH] The deleteAll method now assumes that all IDs in the remove set exists in this set when this set is undefined (ALL-IDed). It will now correctly update the undefined count by the size of the given remove set.
---
opends/src/server/org/opends/server/backends/jeb/EntryIDSet.java | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/opends/src/server/org/opends/server/backends/jeb/EntryIDSet.java b/opends/src/server/org/opends/server/backends/jeb/EntryIDSet.java
index 1f3abff..a1342ec 100644
--- a/opends/src/server/org/opends/server/backends/jeb/EntryIDSet.java
+++ b/opends/src/server/org/opends/server/backends/jeb/EntryIDSet.java
@@ -510,7 +510,7 @@
if (!this.isDefined())
{
// Assume there are no overlap between IDs in that set with this set
- if(undefinedSize != Long.MAX_VALUE && that.size() > 0)
+ if(undefinedSize != Long.MAX_VALUE)
{
undefinedSize += that.size();
}
@@ -616,12 +616,10 @@
if (!this.isDefined())
{
- // Can't simply subtract the undefined size of this set to that set since
- // we don't know if there are any duplicates. In this case, we can't
- // maintain the undefined size anymore.
- if(undefinedSize != Long.MAX_VALUE && that.size() > 0)
+ // Assume all IDs in the given set exists in this set.
+ if(undefinedSize != Long.MAX_VALUE)
{
- undefinedSize = Long.MAX_VALUE;
+ undefinedSize -= that.size();
}
return;
}
--
Gitblit v1.10.0