Salesforce

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

« Go Back

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
Keyword Phrase
Last Modified Date1/7/2015 8:34 PM

Powered by