Tracker: Feature Requests

5 Reuse 'deleted' blocks - ID: 1884823
Last Update: Comment added ( cowwoc )

At present, ODB doesn't seem to recover or reuse the space used by
"deleted" objects, without manually invoking defragmentTo() or doing an XML
export/import. When writing new entities, the ODB engine ought to look for
deleted blocks large enough to hold the entity before appending to the
data file. This might help mitigate the 2GB issue, and make the need for
expensive calls to defragmentTo() less frequent.

jturner(at)handshape(dot)com


Nobody/Anonymous ( nobody ) - 2008-02-01 20:12

5

Open

None

Marcelo Mayworm

Java

None

Public


Comments ( 3 )




Date: 2009-11-18 00:17
Sender: cowwoc

I don't know how to vote for issues in SourceForge, but consider this a +1
vote. In my opinion it's vital for the DB to reclaim deleted blocks
on-the-fly (to prevent needless growth) and provide a means to compact
database files after one-time events involving a large number of inserts
and deletes (resulting in a large number of deleted objects that will never
be fully reused).


Date: 2008-02-26 11:30
Sender: olivier_smadjaProject AdminAccepting Donations


Important classes to look at:

ObjectWriter
- protected int markAsDeleted(long currentPosition, OID oid, boolean
writeInTransaction) throws IOException
- protected void storeFreeSpace(long currentPosition, int blockSize)

Things to check/define:
- Check if block size of an object can be computed before storing the
object. Because this size will be used to search for available (deleted)
spaces
- What is the best/fastest way to store/search information about the
deleted blocks.


Date: 2008-02-26 00:06
Sender: nobody

Logged In: NO

Some issues to think about:

- The delete should organize the information on a list in a fast way
- The delete should search the correct/better position in a fast way
- The delete should be an expert to know identify when it is marking
objects that are "neighbor", optimizing space to the insert and update


Log in to comment.

Attached File

No Files Currently Attached

Change ( 1 )

Field Old Value Date By
assigned_to nobody 2008-02-26 11:25 olivier_smadja