Most databases will have an internalID and an userID (AKA Primary Key).
If we change the journal to work this way, we could move IDs from one file to another.
This would be a very simple solution, and very easy to implement. Also, we wouldn't
need to do any external synchronizations. All would be controlled within the journal.
This way, the compactor would just:
|
| List listOfIDs = .... find the list according the way you (Tim) specified, based on
file usage....
|
|
| for (InternalID id: listOfIDs)
| {
| journal.startTransaction();
| journal.delete(internalID);
| journal.append(PrimaryKey, data);
| journal.commitTransaction();
| }
Doing this, we would eliminate all the empty files like you said. And it would also fix
the linked-list issue.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236870#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...