[XADISK-133] time-out on long transaction gives no indication in ClosedStreamException Created: 25/Feb/13  Updated: 27/Aug/13  Resolved: 14/Aug/13

Status: Resolved
Project: xadisk
Component/s: filesystem
Affects Version/s: 1.2.1
Fix Version/s: 1.2.2

Type: Bug Priority: Trivial
Reporter: gunnar_zarncke Assignee: Nitin Verma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Windows 7 64-bit, Java 1.7, Eclipse Juno, Open EJB


When running a performance test writing 12 GB to disk with XADisk I stumbled over an unexpected IOException (full stacktrace below), which was caused by a transaction time-out.
This time-out was triggered in TransactionTimeoutDetector.doWorkOnce(). This I found out by debugging only, because the IOException gave no indication of same but was raising during normal continuous writing.

I recommend testing the rolledbackPrematurely flag when reporting the exception in NativeXAFileOutputStream.checkIfCanContinue(). Locating the out-of-bound close() is difficult (I was lucky that I had no complex code running which might have accidentally closed the stream here or there).

Now the stacktrace:

at org.xadisk.additional.Utilities.wrapWithIOException(Utilities.java:15)
at org.xadisk.additional.XAFileOutputStreamWrapper.write(XAFileOutputStreamWrapper.java:77)
at java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:458)
at de.konzentrik.app.epg.backend.XaTest.testXa(XaTest.java:77)
at [JUnit]
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at [Eclipse.JDT]
Caused by: org.xadisk.filesystem.exceptions.ClosedStreamException
at org.xadisk.filesystem.virtual.NativeXAFileOutputStream.checkIfCanContinue(NativeXAFileOutputStream.java:171)
at org.xadisk.filesystem.virtual.NativeXAFileOutputStream.write(NativeXAFileOutputStream.java:79)
at org.xadisk.additional.XAFileOutputStreamWrapper.write(XAFileOutputStreamWrapper.java:75)
... 25 more

Comment by Nitin Verma [ 02/Mar/13 ]

Thanks Gunnar. Yes, it would definitely help to report the reason for stream close.


Comment by Nitin Verma [ 14/Aug/13 ]

Checked-in the changes to trunk.

Generated at Sun Feb 26 13:19:55 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.