Salesforce

How to reorder ai extents after adding new ai extents to the database

« Go Back

Information

 
TitleHow to reorder ai extents after adding new ai extents to the database
URL NameP71887
Article Number000189531
EnvironmentProduct: Progress
Version: 9.1E
Product: OpenEdge
Version: 10.0B, 10.1x, 10.2x, 11.x, 12.x
OS: All supported platforms
Question/Problem Description
How to reorder ai extents after adding new ai extents to the database

How to ensure the new AI extent can be switched to when:
  • RFUTIL list shows that the last AI extent is not the BUSY extent.
  • The last AI extent is a FULL (unavailable) ai file or a LOCKED (unavailable) ai file.
  • RFUTIL -C aimage new fails with error 3784.
Steps to Reproduce
Clarifying Information
New After-image extents have been added online or offline.
Error MessageCan't switch to after-image extent dbname.a4 it is full. (3773)
Failed to switch to next after-image extent. (3784)
Defect NumberEnhancement PSC00150005 / OE00101921
Enhancement Number
Cause
Resolution
In versions prior to Progress 9.1E or OpenEdge 10.0B, adding additional AI areas will only resolve the problem if the current BUSY AI extent is the last physical AI extent.

Inserting a new AI extent between existing ones will fail to switch when the BUSY extent becomes filled. In other words, when adding a new AI extent, if the extents between the (current) BUSY AI extent and the (newly added) Empty AI extent has (UN-available) FULL or LOCKED extents in-between the two, we will fail to roll-over because we don't 'jump' the unavailable ai extent into the newly-added EMPTY extent.

This is because the ai extent switches have to be sequential from the current BUSY extent.
For Example: rfutil dbname -C aimage list of 5 after-image extents, where the 5th AI extent is the newly added extent,  will show:

EXTENT:   3   -> 4      -> 5        -> 1           -> 2
STATUS:   BUSY > FULL    > EMPTY     > LOCKED       > LOCKED
SEQNO:    7   -> 4      -> 0        -> 5           -> 6 


When we resume operations, AI Extent 3 will eventually fill up or be switched by a cron job and we cannot skip over extent 4 to the newly added extent 5. 
Extent 4 needs to be an EMPTY extent.
If AI Extent 3 is a variable extent, it will continue to grow until it either hits the 2GB extent limit (without largefiles enabled) or avaiable disk space or user quota/ulimits.

AI extents can be re-orderdered offline, since Progress 9.1E, OpenEdge 10.0B (and later):

A new
"prostrct reorder ai <dbname>" utility was added to overcome this situation.  This is an enhancement can be used​​​​​​​ to place EMPTY AI extents immediately after the current BUSY extent, in front of the existing FULL/LOCKED extents to allow an AI switch to succeed.

It is advised to upgrade to OpenEdge 10.2B before using PROSTRCT REORDER, for previous versions refer to the IMPORTANT NOTE summary below and otherwise Article:

How to reorder AI extents?

0. If AIMGT is enabled, temporarily switch the archive interval to 'on demand' as opposed to timed until such time as the database can be taken offline to reorder AI extents:

$  dsrutil dbname -C aiarchiver setinterval 0

1.  Create a structure file containing only the AI areas that need to be added
    

# addnewai.st example
a . v 2000000
a . f 2000000
a .

2.  Add the new AI extents to the database structure:
 
If the database is online and has not stalled: $   prostrct addonline dbname addai.st 
If the database is offline: $   prostrct add dbname addai.st 

Then update the structure file and list the current AI Status and Sequences:
$   prostrct list dbname
$   rfutil dbname -C aimage list > preorder.out

 
3.  If the current BUSY AI extent is not the last physical AI extent, re-order the AI extents (offline):
 
$  proshut <dbname> -by -shutdownTimeout immed
$  prostrct reorder ai <dbname>
$   rfutil dbname -C aimage list > postreorder.out


4.  After adding available AI extents, restart the databases for replication communications to resume once syncronization has completed. 

Optionally, the LOCKED AI extents can be manually applied to the target database, particularly when there is high latency between the source and target databases.  For further instruction refer to Article  How to manually apply a LOCKED AI extent to the target database?  

Example: New AI extents can be added when the current BUSY AI extent is not the last physical AI extent by then reordering the AI extents offline, once they have been added. 

Continuing the example from above, a "rfutil dbname -C aimage list" would produce the following result that would ensure normal roll-over ai switch, after "
prostrct reorder ai <dbname>" has been run. The ai SEQUENCE numbers are re-ordered to ensure that the new EMPTY extent is immediately after the current BUSY extent.

Before AI Extent 5 was added:
EXTENT:   3   -> 4      -> 1           -> 2
STATUS:   BUSY > FULL    > LOCKED       > LOCKED
SEQNO:    7   -> 4      -> 5           -> 6


After AI Extent 5 is added:
EXTENT:   3   -> 4      -> 5        -> 1           -> 2
STATUS:   BUSY > FULL   > EMPTY     > LOCKED       > LOCKED
SEQNO:    7   -> 4      -> 0        -> 5           -> 6


After "PROSTRCT reorder"
EXTENT:   3     -> 4     -> 5         -> 1           -> 2
STATUS:   BUSY  > EMPTY  > FULL       > LOCKED       > LOCKED
SEQNO:    7     -> 0     -> 4         -> 5           -> 6

IMPORTANT NOTE: 

Workaround
If unable to upgrade, adding additional AI areas should only be added at a time when either:

A.  The current BUSY AI area is the last physical AI Area (extent 4 in the above example is the BUSY extent when new ai extent 5 is added),


EXTENT:   3     -> 4      -> 5        -> 1           -> 2
STATUS:   LOCKED > BUSY    > EMPTY     > LOCKED       > LOCKED
SEQNO:    7     -> 8      -> 0        -> 5           -> 6 


B.  AI extents between the current BUSY and the last ai extent are all EMPTY (extent 4 in the above example is an EMPTY extent when new ai extent 5 is added). 

EXTENT:   3   -> 4      -> 5        -> 1           -> 2
STATUS:   BUSY > EMPTY   > EMPTY     > LOCKED       > LOCKED
SEQNO:    7   -> 0      -> 0        -> 5           -> 6


Alternatively:
  • Any FULL extents need to be backed up then emptied with "rfutil -C aimage empty"
  • If the database is enabled for AI Management, unlike RFUTIL -C aimage empty, RFUTIL -C aiarchive extent or -C aiarchive nextextent go through crash recovery and therefore need to be run online or AIMGT must be disabled.  Refer to Article  Manual aiarchive extent offline fails errors 3773 5350 3774   
  • If the database has been enabled for Fathom/OpenEdge Replication, and the extents are LOCKED, then Replication will need to be disabled in order that the AI extents are marked FULL and can then be emptied. After-which, the replication target will need to be re-baselined.
Notes
Keyword Phrase
Last Modified Date11/20/2020 6:53 AM

Powered by