Salesforce

Why do Active Transactions under have _trans-duration of ?

« Go Back

Information

 
TitleWhy do Active Transactions under have _trans-duration of ?
URL Name000043909
Article Number000157932
EnvironmentProduct: Progress
Version: 9.1x
Product: OpenEdge
Version: 10.x, 11.x, 12.x
OS: All Supported Platforms
Other: VST _trans
Question/Problem Description
Why do active transactions under VST _trans-state have a _trans-duration of "?", when the transaction has a Share or Exclusive lock against a record?
Why does querying _trans VST, returns unknown values  '?' on Tx Duration and StartTime but a Transaction Number is assigned?.
 
Steps to Reproduce
Clarifying Information
This clarifying information is to show that the 'Transaction State' has a different word depending on the version of OpenEdge.

OpenEdge Example 10.+:
 
TransAction Num    Transaction State    Transaction Duration
          50016            ALLOCATED                       ?

Progress Example: 9.1x
 
TransAction Num    Transaction State    Transaction Duration
          50016                BEGIN                       ?

The following code demonstrates the above:
 
FOR EACH _trans no-lock 
       WHERE _trans-num <> ? 
       AND _trans-state <> "active": 
DISPLAY _trans-num _trans-state _trans-duration.
Error Message
Defect Number
Enhancement Number
Cause
Resolution
The BEGIN or ALLOCATED transaction state is the first state a transaction will enter (depending on the Progress/OpenEdge version, that is because the "WORD" used to designate the "initial instantiation" of a transaction was changed).  

A transaction number is assigned the moment a Lock (X, XL) is requested by the query, even without an update, create or delete statement being called. At this point in time there is no transaction started, which is why the Transaction Duration Time (_trans-durationdisplays as unknown even though a transaction number and lock has been assigned.

The transaction duration counter starts only when a CREATE, UPDATE or DELETE statement is issued. At this point, the transaction state changes to ACTIVE.  

Note, that if a CREATE, UPDATE or DELETE statement in a transaction is held in a 'pause' state for some reason and it is the first in a transaction, this transaction state will not change to ACTIVE and the transaction duration counter will remain as unknown (?) because this transaction effectively has not been committed yet.  Once the 'pause' has expired, this transaction becomes active and the transaction duration counter starts. 

If a WAIT statement is inserted, the process does not complete until the wait is satisfied. The transaction duration counter will continue to accumulate until the the wait time ends and the process is able to complete.  This would also trigger bi growth, as the WAIT state has locked the bi-cluster where the ACTIVE transaction initiated.

Refer to Article 000022353 for further discussion of the BEGIN or ALLOCATED transaction state.
 
 
Workaround
Notes
Keyword Phrase
Last Modified Date11/20/2020 7:17 AM

Powered by