Feedback
Did this article resolve your question/issue?

   

Article

Why do Active Transactions under have _trans-duration of ?

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
Last Modified Date11/20/2020 7:17 AM
Attachment 
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.