[
https://issues.apache.org/jira/browse/TRAFODION-2468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15861734#comment-15861734
]
Prashanth Vasudev commented on TRAFODION-2468:
----------------------------------------------
Description of the issue and proposed solution.
/*
* DDL specific recovery operation use cases are as follows:
* In case of phase 1 prepare , phase 2 commit, DDL operations are
* completed once the region operations are complete. However incase of TM
* going down and restarting, some of the state information is lost.
* 1. If the DDL operation also involves DML operations, regions that have
* in doubt transaction request for help. Recovery thread here reconstructs
* the TS state and also DDL operation state from TMDDL and redrives the
operation.
*
* 2. If all the regions have completed their operations and if only DDL
operation
* is pending and TM goes down and restarted, there are no regions that
* would seek help to redrive the operations. if there is pending DDL
operation
* it will be left starving as there are no triggers to redrive the
operation.
* To handle this case, every time TM starts, as part of recovery thread
start
* a general scan of TMDDL is made to check for owning transIDs and those
that
* have active DDL is checked against state of transaction and appropriately
redriven.
*
* 3. Failure of TM and restart of TM can happen at any state of DDL
operation
* in progress and before that operation is recorded as complete. One way to
* accurately keep note of this operation in progress is to record the
operation
* before and after the operation. For this, the table against which the
operation
* is being performed would be the key in a new log, we choose another table
* called TmDDLObject table. This acts as a global semaphore for DDL table
* operation. Recovery Thread as part of its startup processing always
checks
* against TmDDLObject table and if it owns the transaction, continues to
* recover the DDL operation.
*/
Recovery thread already handles step 1 above. Step 2 and Step3 will be
delivered in phases.
> Recovery of DDL transaction may fail upon TM restart
> ----------------------------------------------------
>
> Key: TRAFODION-2468
> URL: https://issues.apache.org/jira/browse/TRAFODION-2468
> Project: Apache Trafodion
> Issue Type: Bug
> Components: dtm
> Affects Versions: 2.1-incubating
> Reporter: Prashanth Vasudev
> Assignee: Prashanth Vasudev
>
> Depending on timing of TM process going down and restarting, if there is a
> DDL operation in flight that has not registered in TMDDL table, recovery of
> the DDL operation may get unnoticed.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)