[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Journal Cleanup and Journal Compactor
timfox
do-not-reply at jboss.com
Thu Jun 25 08:35:54 EDT 2009
"clebert.suconic at jboss.com" wrote :
|
| The problem is, when deleteing or updating a record, I don't know where the AddRecord is going to be located at. So, I don't know where to add the negative value to.
|
| So, what I'm thinking as a solution is:
|
| - During compacting, all Adds, updates and deletes are stored to the current-file, as we aways do.
|
| - But instead of discounting POSFiles right away, I cache those IDs on a collection. When I'm done compacting I do a fast operation applying the reference counts accordingly.
|
| - Case the server is interrupted during reload, the delete or update will take the original location of the record.
|
Isn't it simpler than this?
When compacting you don't touch the information in memory. So if an update or delete comes in you just update as normal.
Then when the compacting is done you just do a quick switch over in memory.
I don't see why you need to cache anything.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240019#4240019
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240019
More information about the jboss-dev-forums
mailing list