[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Journal Cleanup and Journal Compactor

clebert.suconic@jboss.com do-not-reply at jboss.com
Wed Jun 10 22:22:48 EDT 2009


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#4236870

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236870



More information about the jboss-dev-forums mailing list