AnsweredAssumed Answered

Deadlock Management Issues

Question asked by alexmc on Jun 6, 2014
Latest reply on Jun 7, 2014 by Gary_Cherlet

Hello all,

  We've implemented following within an ADS dialog to manage index deadlock situations where updates are occurring on a particular record type (PT-PK-SGNOUT-REC) owned by 5 system owned indexes (don't ask)

 

 ACCEPT DB-KEY INTO PT-WK-D431-DBKEY                    
                    FROM PT-PK-SGNOUT-REC CURRENCY.     
 MODIFY PT-PK-SGNOUT-REC ALLOWING (DB-DEADLOCK).        
 IF DB-DEADLOCK                                         
   DO.                                                  
     SNAP RECORD (PT-PK-SGNOUT-REC)                     
          TITLE 'PTELD431 - DEADLOCK MESSAGE'.          
                                                        
     COMMIT ALL.                                        
                                                        
     FIND PT-PK-SGNOUT-REC DB-KEY IS PT-WK-D431-DBKEY.  
                                                        
     MODIFY PT-PK-SGNOUT-REC.                           
   END.                                                 
                                                        
 GOBACK.                                                

The SNAP message is going to the log but the second MODIFY also seems to succumb to an '0829' error (and abort)

Should I:

 - delay the second MODIFY in order to give more time to the competing transaction to complete

- make repeated attempts (for a fixed number of times)

- is the 'COMMIT ALL' insufficient in releasing enought of the resources to allow the competing transaction to complete

 

 

Outcomes