Salesforce

Locking message 2624 does not report accurate data for all users when record is released

« Go Back

Information

 
TitleLocking message 2624 does not report accurate data for all users when record is released
URL NameLocking-message-2624-does-not-report-accurate-data-for-all-users-when-record-is-released
Article Number000177500
EnvironmentProduct: OpenEdge
Version: All supported versions
OS: All supported platforms
Question/Problem Description
Locking message 2624 does not report accurate data for all users when record is released.
Native locking message 2624 does not report the real user in case of queuing.
Does the message 2624 update automatically? 
Steps to Reproduce
Clarifying Information
Example:
- 3 users: User1, User2, User3 are connected to sports2000 db
- in this order they run following code:
FIND FIRST customer EXCLUSIVE-LOCK .
MESSAGE USERID("dictdb") "keeps a lock on first customer record" VIEW-AS ALERT-BOX INFO BUTTONS OK.
- User2 and User3 both get message 2624 saying the customer record is locked by User1
- User1 releases the record and User2 is updated (2624 disappears), however User3 still see the 2624 message that User1 is locking the record
Error Message<file-name> in use by <user> on <tty>. Wait or choose CANCEL to stop. (2624)

You tried to access a data record that is locked by another user. The message tells you the table the record is in and the user who has locked the record. Either choose CANCEL to terminate your operation, or wait for the other user to release the locked record.
Defect Number
Enhancement Number
Cause
This is expected behavior. There is no automatic refresh of 2624 message. This message reflects the state of the record in the time when the lock was requested.
Resolution
Updating of 2624 message can be achieved by using Lock Wait Timeout (-lkwtmo) startup parameter at the beginning of the session, set it to for example 5 seconds and then ON STOP rerun the code as follows:
DO ON STOP UNDO, RETRY:

   FIND FIRST customer EXCLUSIVE-LOCK .
   MESSAGE USERID("dictdb") "keeps a lock on first customer record" 
                                          VIEW-AS ALERT- BOX INFO BUTTONS OK.

End.
In above scenario 2624 message is updated every 5 seconds with accurate data who is locking the record.
Workaround
Notes
References to Other Documentation:

 What is the -lkwtmo parameter used for?
Keyword Phrase
Last Modified Date11/20/2020 7:19 AM

Powered by