[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Non atomic issue with paging

timfox do-not-reply at jboss.com
Sun Dec 21 05:05:52 EST 2008


The way paging currently works, the isPaging() check is done first before the message is routed, then later the pagingStore.addSize() method is called.

Since isPaging() and addSize() are not done together as an atomic operation, it is possible that many threads could call isPaging() at the same time and return false to all of them.

Then later they all call addSize() and the system runs out of memory. To guarantee we don't run out of memory isPaging() and addSize() would have to be combined in a single atomic operation.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197839#4197839

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



More information about the jboss-dev-forums mailing list