xadisk
  1. xadisk
  2. XADISK-133

time-out on long transaction gives no indication in ClosedStreamException

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: 1.2.2
    • Component/s: filesystem
    • Labels:
      None
    • Environment:

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

      Description

      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:

      java.io.IOException
      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

        Activity

        Hide
        Nitin Verma added a comment -

        Checked-in the changes to trunk.

        Show
        Nitin Verma added a comment - Checked-in the changes to trunk.
        Hide
        Nitin Verma added a comment -

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

        Regards,
        Nitin

        Show
        Nitin Verma added a comment - Thanks Gunnar. Yes, it would definitely help to report the reason for stream close. Regards, Nitin

          People

          • Assignee:
            Nitin Verma
            Reporter:
            gunnar_zarncke
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: