You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hawq.apache.org by "LyndonYang (Jira)" <ji...@apache.org> on 2021/01/13 06:35:00 UTC

[jira] [Created] (HAWQ-1777) Database reset due to transaction ID assignment problem

LyndonYang created HAWQ-1777:
--------------------------------

             Summary: Database reset due to transaction ID assignment problem
                 Key: HAWQ-1777
                 URL: https://issues.apache.org/jira/browse/HAWQ-1777
             Project: Apache HAWQ
          Issue Type: Bug
          Components: Core
            Reporter: LyndonYang
            Assignee: Ruilong Huo


*AtAbort_AppendOnly*

        *while* ((pending = (AppendOnlyHashEntryPendingCleanup *) hash_seq_search(&status)) != NULL)

        {

            *if* (pending->nestedLevel >= currentLevel)

            {

                /*

                 * the sub transaction which include the truncate/alter operator has been aborted,

                 * so its aoentry is not staled anymore.

                 */

 

                aoentry = AORelLookupHashEntry(pending->relid);

 

                *if* (aoentry)

                {

                    Insist(aoentry->staleTid == CurrentXid);

                    aoentry->staleTid = InvalidTransactionId; //clear flag stale

                }

 

                hash_search(AppendOnlyHashEntryPendingDeleteCleanup,

                        (*void* *) &pending->relid,

                        _HASH_REMOVE_,

                        &found);

            }

        }

If an error occurs during execution, aoentry->staleTid is not assigned,abort will failed and 

_AOSegFileLock cannot free, which maybe cause when abort the entire transaction cannot get the lock_

 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)