Skip to content

Commit

Permalink
added remove operation to collection index (re-activation)
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4503 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Feb 23, 2008
1 parent d477483 commit 677ee2e
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions source/de/anomic/kelondro/kelondroCollectionIndex.java
Expand Up @@ -915,17 +915,15 @@ public synchronized int remove(byte[] key, Set<String> removekeys) throws IOExce
oldcollection.sort();
oldcollection.trim(false);

/* in case that the new array size is zero we dont delete the array, just allocate a minimal chunk
*
if (oldcollection.size() == 0) {
// delete the index entry and the array
kelondroFixedWidthArray array = getArray(oldPartitionNumber, serialNumber, oldchunksize);
array.remove(oldrownumber, false);
index.remove(key);
array_remove(
oldPartitionNumber, serialNumber, this.payloadrow.objectsize,
oldrownumber);
index.remove(key, true);
return removed;
}
*/

int newPartitionNumber = arrayIndex(oldcollection.size());

// see if we need new space or if we can overwrite the old space
Expand Down

0 comments on commit 677ee2e

Please sign in to comment.