Re: Corrupted Transaction?

Justin Sampson <[email protected]> Fri, 27 Feb 2015 00:53:11 +0000
Newsgroups gmane.comp.java.prevayler
Message-ID <0FD072A166C6DC4C851F6115F37DDD279AEEA0D4@sm-ex-01-vm.guidewire.com>
Vitor F. Pamplona wrote:

> Looks like it is in the middle of the file. I have a base snapshot
> and a single .journal in the directory.
>
> I was looking into the logs but could not find anything related to
> Prevayler msgs. Tomcat crashed due to OutOfMemoryException and may
> have lead to this error. :( 
>
> I saved the journal and the snapshot if we want to investigate
> more.

Yeah, OutOfMemoryErrors are hard to code defensively against.
Prevayler tries to be pretty conservative, and should refuse to
write a transaction to the journal out of order. But if the OOME
happens right in the middle of that logic, it's hard to predict what
would happen.

You can try opening up the journal file to look for clues. It's not
just a matter of skipping a corrupted transaction, since the problem
is with the transaction numbers themselves. Each transaction is
stored in binary form (assuming you're using the default Java
serialization) but there's a plain text header before each one that
indicates the transaction number (systemVersion=...).

Cheers,
Justin
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion
_______________________________________________
"Databases in Memoriam" -- http://www.prevayler.org