Skip to main content

[JIRA] Created: (XADISK-138) XASystemNoMoreAvailableException after interruption

  • From: "gunnar_zarncke (JIRA)" <jira-no-reply@...>
  • To: issues@...
  • Subject: [JIRA] Created: (XADISK-138) XASystemNoMoreAvailableException after interruption
  • Date: Thu, 11 Jul 2013 17:16:00 +0000 (UTC)
  • Auto-submitted: auto-generated

XASystemNoMoreAvailableException after interruption
---------------------------------------------------

                 Key: XADISK-138
                 URL: https://java.net/jira/browse/XADISK-138
             Project: xadisk
          Issue Type: Bug
          Components: filesystem
    Affects Versions: 1.2.1
         Environment: Windows 7, JDK 7
            Reporter: gunnar_zarncke
            Assignee: Nitin Verma


I got a XASystemNoMoreAvailableException thrown in 
NativeXAFileSystem.notifySystemFailure due to an Thread.interupt()-ion during 
completeReadOnlyTransaction() which caused a ClosedByInterruptException.
I couldn't reproduce it (it occurred only once in a running test-system) even 
though I tried with the below test code. That code produces some other but 
less problematic issue.

Note that I have an environment which relies heavily on interrupting 
cooperating Threads which run for too long or (partly) failed. Thus I cannot 
simply or easily avoid triggering interuption.

The below test code produces an issue during shutdown, but not during the 
transaction:

                System.out.println("Booting XADisk...");
                StandaloneFileSystemConfiguration configuration = new 
StandaloneFileSystemConfiguration(
                                "target/xadisk-fail/system", "id-1");
                XAFileSystem xafs = 
XAFileSystemProxy.bootNativeXAFileSystem(configuration);
                xafs.waitForBootup(-1);
                System.out.println("XADisk is now available for use.");

                File testFile = File.createTempFile("xa-file", ".dat");
                testFile.deleteOnExit();
                long waitUntil = System.currentTimeMillis() + 
Times.MILLIS_PER_SECOND;
                while (System.currentTimeMillis() < waitUntil) {
                        Session session = 
xafs.createSessionForLocalTransaction();

                        XAFileOutputStream xaos = 
session.createXAFileOutputStream(testFile, false);
                        xaos.write("Hello World!".getBytes(Misc.UTF_8));
                        Thread.currentThread().interrupt();
                        xaos.write("Hello World2!".getBytes(Misc.UTF_8));
                        Thread.currentThread().interrupt();
                        xaos.close();
                        Thread.currentThread().interrupt();
                        session.commit();
                }
                Thread.interrupted();

                xafs.shutdown();
                System.out.println("XADisk is down.");


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://java.net/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[JIRA] Created: (XADISK-138) XASystemNoMoreAvailableException after interruption

gunnar_zarncke (JIRA) 07/11/2013

[JIRA] Commented: (XADISK-138) XASystemNoMoreAvailableException after interruption

Nitin Verma (JIRA) 07/14/2013
 
 
Close
loading
Please Confirm
Close