xadisk
  1. xadisk
  2. XADISK-146

CrashRecovery silently fails on error during recoverHeavyWriteTransactionsForRollback

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.2.2
    • Fix Version/s: current
    • Component/s: filesystem
    • Labels:
      None
    • Environment:

      Windows 7, broken Eclipse Juno, JDK 6

      Description

      The after crash recovery of an XADisk istance may fail silently when files written in heavy write mode are deleted (or otherwise missing). This leads to hard to find and recover szenrios (luckily for me only in a unit test).

      The problem starts when hanging transaction logs are executed in recoverHeavyWriteTransactionsForRollback.
      Exceptions throw by rollback in TransactionCompleter are caught in WorkRunnable but in absence of a WorkListener silently discarded.

      I recommend to add a WorkListener during CrashRecovery which logs these Exception loudly. Or alternatively to use a WorkListener passed in during startup.

        Activity

        gunnar_zarncke created issue -
        Hide
        Nitin Verma added a comment -

        I have created another bug to discourage the use of work scheduling methods (in WorkManager) without using WorkListener: https://java.net/jira/browse/XADISK-166. As updated there, at present there are two such places and the above mentioned "recoverHeavyWriteTransactionsForRollback" was one of them.

        I have checked-in the changes. Now, the workListener instance from NativeXAFileSystem, which is used for all kinds of work scheduling, would be used for observing the failures during "recoverHeavyWriteTransactionsForRollback" too. Though, there is no logging at present by the workListener (class: CriticalWorkListener). When an exception is noticed, "xaFileSystem.notifySystemFailure" would be triggered.

        Show
        Nitin Verma added a comment - I have created another bug to discourage the use of work scheduling methods (in WorkManager) without using WorkListener: https://java.net/jira/browse/XADISK-166 . As updated there, at present there are two such places and the above mentioned "recoverHeavyWriteTransactionsForRollback" was one of them. I have checked-in the changes. Now, the workListener instance from NativeXAFileSystem, which is used for all kinds of work scheduling, would be used for observing the failures during "recoverHeavyWriteTransactionsForRollback" too. Though, there is no logging at present by the workListener (class: CriticalWorkListener). When an exception is noticed, "xaFileSystem.notifySystemFailure" would be triggered.
        Hide
        Nitin Verma added a comment -

        Changes made to use a workListener, through bug https://java.net/jira/browse/XADISK-166.

        Show
        Nitin Verma added a comment - Changes made to use a workListener, through bug https://java.net/jira/browse/XADISK-166 .
        Nitin Verma made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s current [ 13583 ]
        Resolution Duplicate [ 3 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: