Salesforce

AI extent remains LOCKED after an extent switch or online backup of a source replicated database

« Go Back

Information

 
TitleAI extent remains LOCKED after an extent switch or online backup of a source replicated database
URL NameP65712
Article Number000141269
EnvironmentProduct: Fathom Replication
Version: 2.x, 3.x
Product: OpenEdge Replication
Version: 10.x, 11.x, 12.x
OS: All supported platforms
Question/Problem Description
AI extent remains LOCKED after online backup on source replicated database
AI extent remains LOCKED after an aimage extent switch
Data are missing in the target database after an ai extent switch
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
This is expected behaviour:

An AI Transaction Log Record (AI Note) is written to the current AI buffer (in shared memory) whenever an AI extent switch is performed. This ai buffer is not flushed to disk because it's not full. AI buffers are only flushed to disk when they become full or when -Mf expires after a transaction end. In other words, one transaction after the ai extent switch which set its status to "LOCKED".
 
Resolution
In order to "unlock" the AI extent, under normal production transaction processing workload and low replication latency conditions, the AI buffer containing the AI switch note will and the associated last AI pointers in RPLS-Q will be processed against the target database, unlocking the AI extent for re-use.

Otherwise a dummy update on the source database will result in the same action, if it is only the last notes in the switched AI file that need processing.

For example:  Determine which table/record would be suitable for your specific database:
 
FIND FIRST <DummyTable> EXCLUSIVE-LOCK NO-ERROR .
IF AVAILABLE <DummyTable> THEN
   <DummyTable.Desc> = STRING(NOW).
  1. The dummy update code could either be run immediately after a manual AI extent switch, at a specified time via a scheduler such as CRON, or prior to custom scripts that do checking for LOCKED extents.  The technique used may depend on whether custom scripts that manage after imaging or the database is enabled for the AI Archiver feature.
  2. Run the code after scheduled backups (probkup) or PROQUIET enable, as these utilities will automatically force an ai extent switch.
  3. The AI extent may remain LOCKED immediately after running the dummy program which assures a transaction end and that it may take a few seconds for the AI block to be flushed and the status to become FULL or EMPTY when AIMGT is used.
The resolution in this Article refers to the singular AI extent which is switched from when online PROBKUP is run (a LOCKED extent) or the AI extent that is switched with RFUTIL -C AIMAGE NEW or during online processing.

While there may be only one LOCKED extent at the time, due to frequency of switching it is additionally plausible that replication latency is playing it's part in LOCKED extents, where this dummy code will not unlock the extent as there are still remaining transaction notes in it to still be processed. Monitoring how far the replication target is behind the replication source with the DSRUTIL utility will provide additional metrics to support the reason ai files are remaining in LOCKED status.  Refer to Article:
Workaround
Notes
Keyword Phrase
Last Modified Date12/11/2020 11:15 AM

Powered by