Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-3610

A new logic to suspend the Recovery Manager should be introduced in Narayana

    • Icon: Enhancement Enhancement
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • None
    • Recovery, Transaction Core
    • None
    • Hide
      This enhancement was rejected with the motivation:

      "Lifecycle management belongs in the server, not the transaction engine. Recovery needs to expose sufficient state/callbacks for the server to determine when its done, but driving it is the server's problem."
      Show
      This enhancement was rejected with the motivation: "Lifecycle management belongs in the server, not the transaction engine. Recovery needs to expose sufficient state/callbacks for the server to determine when its done, but driving it is the server's problem."

      Current RecoveryManager’s suspension

      At the moment, the suspension of the RecoveryManager (RM) waits for the (running) periodic scan to end. This represents Narayana's last-ditch attempt to recover in-doubt transactions. Once the periodic scan is ended, the `RM` (to be more precise, the `PeriodicRecovery`) enters `SUSPENDED` mode and all in-doubt transactions are left as are in the Object Store. This is based on the assumption that the RM will be resumed and, as a consequence, all in-doubt transactions will be completed.

      New proposal

      Following a series of issues (linked to this JBTM issue) in WFLY/EAP, a need for a new RM’s suspension has been raised. The requirements are still a bit loose and more info will be added to this issue as the design discussion (that happens here and in all of Narayana's[ communication channels|https://www.narayana.io/community/index.html]) goes forward. So far, the main requirements are:

      • When starting the procedure to suspend the RM, new transactions should not be created
      • Once the creation of new transactions is no longer possible, the RM waits for the completion of all in-doubt transactions in the Object Store before suspending

      Bits and bobs

      This section is a collection of suggestions that contributors proposed in different places:

      • [Michael] Add property to the RecoveryEnvironmentBean to indicate whether or not suspend should wait for the store to become empty. WildFly would control it via the management model
      • And change/add the WildFly transactions subsystem suspend logic to wait until the RecoveryManager suspend call finishes. In the meantime, if the user sets the property to false then periodic recovery will notice after the current pass completes and will return control back to the suspend logic which in turn will return control back to the app server

            [JBTM-3610] A new logic to suspend the Recovery Manager should be introduced in Narayana

            This issue is missing a lot of detail. The description says that "The requirements are still a bit loose and more info will be added to this issue as the design discussion goes forward"; where is that discussion happening, if it is happening then can you link to them from here, in particular I'd like to see the requirements, and the justification for them, before the design phase.

            The description also says that there is "a need for a new RM’s suspension has been raised":

            > So far, the main requirements are:
            >
            > 1. When starting the procedure to suspend the RM, new transactions should not be created
            > 2. Once the creation of new transactions is no longer possible, the RM waits for the completion of all in-doubt transactions in the Object Store before suspending

            The first requirement already happens (it is done by the EJB subsystem).
            Why can't the second requirement be implemented in the WildFly Transactions subsystem?

            If you have introduced this issue to support other Application Servers then I think we need a lot more detail about why those application servers need the new functionality that this issue is asking for, otherwise the RFE is merely a theoretical requirement/enhancement.

            Secondly, this issue looks to be related to (https://issues.redhat.com/browse/JBTM-3660).
            Is JBTM-3660 required for JBTM-3610? I would argue not since the WildFly Transactions subsystem suspend/resume logic can do what's being asked for in this JBTM issue,

            Michael Musgrove added a comment - This issue is missing a lot of detail. The description says that "The requirements are still a bit loose and more info will be added to this issue as the design discussion goes forward"; where is that discussion happening, if it is happening then can you link to them from here, in particular I'd like to see the requirements, and the justification for them, before the design phase. The description also says that there is "a need for a new RM’s suspension has been raised": > So far, the main requirements are: > > 1. When starting the procedure to suspend the RM, new transactions should not be created > 2. Once the creation of new transactions is no longer possible, the RM waits for the completion of all in-doubt transactions in the Object Store before suspending The first requirement already happens (it is done by the EJB subsystem). Why can't the second requirement be implemented in the WildFly Transactions subsystem? If you have introduced this issue to support other Application Servers then I think we need a lot more detail about why those application servers need the new functionality that this issue is asking for, otherwise the RFE is merely a theoretical requirement/enhancement. Secondly, this issue looks to be related to ( https://issues.redhat.com/browse/JBTM-3660 ). Is JBTM-3660 required for JBTM-3610 ? I would argue not since the WildFly Transactions subsystem suspend/resume logic can do what's being asked for in this JBTM issue,

              jfinelli@redhat.com Manuel Finelli
              jfinelli@redhat.com Manuel Finelli
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: