Feedback
Did this article resolve your question/issue?

   

Article

Transaction state of BEGIN does not change to Active in promon when updating a non-index field on a table

Information

 
TitleTransaction state of BEGIN does not change to Active in promon when updating a non-index field on a table
URL Name000056640
Article Number000173965
EnvironmentProduct: OpenEdge
Version: 11.x
OS: All supported platforms
Other: Database transaction state
Question/Problem Description
Transaction state of BEGIN does not change to Active in promon when updating a non-index field on a table
Monitoring transaction state from promon > R&D > Option 1 (Status Displays ...) > Option 4 (Processes/Clients ...) > Option 3 (Active Transactions)
 
Steps to Reproduce
Clarifying Information
ABL example not changing transaction state from BEGIN to ACTIVE using sports2000:

FIND FIRST customer EXCLUSIVE-LOCK.
PAUSE.
UPDATE customer.state.
PAUSE.


After changing the state record, the transaction state still remains BEGIN.
Error Message
Defect Number
Enhancement Number
Cause
This is working as designed.

This phenomenon results from the fact that the ABL is optimizing the record update. Since the field being updated "customer.state" is neither a lob nor associated with any index, the ABL engine 
will wait as long as possible to actually request the update from the storage engine.

It waits for performance reasons thinking that if another update to the same record buffer were to occur  (that is like multiple assign statements to the same record buffer) before the buffer is re-used or
goes out of scope  then it only needs to perform one update request of the storage engine as opposed to two. In addition, if the action were rolled back, the ABL could avoid an interaction with the storage engine.
Resolution
This can be shown in 2 simple ways:

1. Add a buffer release statement after "customer.state" and before the pause.  This will change the transaction state to active when the buffer is released.
Example:

FIND FIRST customer EXCLUSIVE-LOCK.
PAUSE.
UPDATE customer.state.
RELEASE customer.state.
PAUSE.


2. Change the update statement to include a field associated with an index.  For example "UPDATE customer.state customer.country.".  This will change the transaction state to active immediately after the update statement because the index associated with "customer.country" needs to be updated.

Example:

FIND FIRST customer EXCLUSIVE-LOCK.
PAUSE.
UPDATE customer.country. 
/* OR */ /* UPDATE customer.state customer.country. /* country needs to be updated as well */ */
PAUSE.

 
Workaround
Notes
Last Modified Date1/7/2015 8:34 PM
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.