Salesforce

How to check if there are AI Blocks waiting to be sent from Replication Server to Target

« Go Back

Information

 
TitleHow to check if there are AI Blocks waiting to be sent from Replication Server to Target
URL Name000069675
Article Number000185506
EnvironmentProduct: OpenEdge
Version: 10.2B, 11.x, 12.x
OS: All supported platforms
Other: OpenEdge Replication
Question/Problem Description
How to check if there are AI Blocks to be sent from Replication Server to Replication Target 

How to monitor replication latency between the source and target database(s)

How to assure the source database will not stall when the Replication Server and Replication Target are out of sync
At some point, DSRUTIL monitor indicates the Replication Server stops sending AI Blocks to Replication Target
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
The DSRUTIL monitor utility provides metrics on the current status of replication processing. 
Use Database Replication, Reference - OpenEdge Replication DSRUTIL MONITOR  
https://docs.progress.com/bundle/openedge-database-replication/page/Startup-menu.html   

This Article seeks to provide further information when diagnostic replication latency metrics reported by the DSRUTIL -C monitor utility and in particular how -pica plays it's part in these metrics.

When DSRUTIL monitor > Replication agent status shows the transaction figures under the Latency Information section are different between the source database and the target when there should be no latency.  This is caused by:

1.  There are no AI Blocks to be sent from Replication Server (RPLS) to Replication Agent (RPLA), because there have been no AI Blocks written in the given period of time, or
2.  There is little activity and an active transaction is still not committed in the source database, therefore not available to be sent from Replication Server to Replication Target yet because the current AI block has not been flushed to disk because it's not full. The AI Transaction Log Record (AI Note) is written to the current AI buffer (in shared memory) whenever an AI extent switch is performed. AI buffers are only flushed to disk when they become full or when -Mf expires after a transaction end (eg. one transaction after the online backup/ai extent switch). One of the metrics reported by DSRUTIL -C monitor is:  Repl Server behind Source DB by 
The time of the last AI block write is saved into each AI block that is written. This time is then sent to the agent from the server and is used to calculate time latency when the Replication Agent acknowledges having applied this information to the target database.  For further clarification refer to Article: In order to further diagnose latency time, the replication message queue (RPLS-Q) can be examined. It is important to understand that when there are no more free entries (sized by the -pica parameter), the source database will stall. For further clarification refer to Article:
 Cannot terminate replication server process is blocked or when the pica buffer is full  

To verify if there are AI Blocks available to be sent from Replication Server to Replication Agent:

1. In the source database, read the VST table: _DbServiceManager added in OpenEdge 11.6.

A value greater than zero in the field _DbServiceManager._DbSvcMgr-UsedMsgEntries indicates that there are AI Blocks waiting in the RPLS-Q to be sent from Replication Server to Replication Agent. It is important to monitor this value in relation to the _DbServiceManager._DbSvcMgr-FreeMsgEntries remaining during periods it looks like the latency between source and target seems to be increasing or is not changing.

ABL code examples using the _DbServiceManager VST is provided in the following Article: 2. Use PROMON to view Database Service Manager metrics:
          
PROMON > R&D > 1 > 16 Database Service Manager
Free Message Entries ==  _DbServiceManager._DbSvcMgr-FreeMsgEntries
Used Message Entries  ==  _DbServiceManager._DbSvcMgr-UsedMsgEntries
In order to check and tune the Replication Server queue (-pica) and Agent acknowledgements (-asc) refer to Articles:
Workaround
Notes
Keyword Phrase
Last Modified Date12/11/2020 11:34 AM

Powered by