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 pl
ace 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: