added remove operation to collection index (re-activation)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4503 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 17 years ago
parent d477483373
commit 677ee2ea04

@ -915,17 +915,15 @@ public class kelondroCollectionIndex {
oldcollection.sort(); oldcollection.sort();
oldcollection.trim(false); 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) { if (oldcollection.size() == 0) {
// delete the index entry and the array // delete the index entry and the array
kelondroFixedWidthArray array = getArray(oldPartitionNumber, serialNumber, oldchunksize); array_remove(
array.remove(oldrownumber, false); oldPartitionNumber, serialNumber, this.payloadrow.objectsize,
index.remove(key); oldrownumber);
index.remove(key, true);
return removed; return removed;
} }
*/
int newPartitionNumber = arrayIndex(oldcollection.size()); int newPartitionNumber = arrayIndex(oldcollection.size());
// see if we need new space or if we can overwrite the old space // see if we need new space or if we can overwrite the old space

Loading…
Cancel
Save