I was dealing with one of the most obscure bugs I had ever seen on my 20 years
programming. After I found it, as aways it was a dumb and obvious bug, but it was a
little hard to find this one:
When the journal was creating a byte buffer, it was sending it to the JNI layer and it was
immediately releasing the reference to the ByteBuffer. As the write was being done
asynchronously, the ByteBuffer could be eventually released (GC) at the same time it was
being written, what was creating gargabe on the journal.
Well.. at least that was a good exercise during my tests, so I'm pretty sure the
journal is loading data properly and dealing with holes on transactions. I have written a
few Stress Tests to catch this bug. I can't reproduce this on a Unit Test.
I will write a few more tests on Reload and incomplete transactions, and maybe make few
other improvements on the journal. (Maybe improve the collections on the journal making it
use less memory. I have a few ideas that I will input on the forums tomorrow).
BTW: Most of the information is on the WIKI already. I have made a few modifications on
the code regarding Transactions counter to deal with holes and I will put that on the WIKI
tomorrow. (I'm writing the counter per journal file, as reclaiming could legally get
part of a transaction).
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166048#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...