FairCom Server V12 and later support both asynchronous and synchronous replication for c-tree data files under full transaction control. The new Synchronous Replication Agent can better address cases where high availability is crucial:
With Replication Manager, the user can choose between synchronous and asynchronous replication when setting up replication plans.
Note: Depending on the synchronous replication mode selected, it is possible update operations may experience performance penalties.
Requirements
Synchronous replication requires files to have replication support enabled, which means they must meet the same requirements for data replication as previous asynchronous replication did:
Enabling Synchronous Replication with Replication Manager
When configuring replication, the Replication Manager browser-based application has a check box that allows a replication mode to be enabled as either Synchronous or Asynchronous. The replication mode can be set on a per-plan basis.
Enabling Synchronous Replication with Replication Agent
To enable synchronous replication for a file, follow these steps:
C:\> repadm -c addsyncagent agent1 -s FAIRCOMS@source_hostname
FairCom DB(tm) Version 12.0.81 (Build-201020) Replication Agent Management Utility
Copyright (C) 1992 - 2020 FairCom Corporation
ALL RIGHTS RESERVED.
Successfully added synchronous replication agent 'agent1'
C:\> repadm -c addsyncagentfilemap mark.dat agent1 -s FAIRCOMS
FairCom DB(tm) Version 12.0.81 (Build-201020) Replication Agent Management Utility
Copyright (C) 1992 - 2020 FairCom Corporation
ALL RIGHTS RESERVED.
Successfully added mapping to synchronous replication agent 'agent1' for file 'mark.dat'
It is possible to enable synchronous replication for a data file on more than one secondary server. Simply create a synchronous replication agent for each secondary server and repeat the above steps for each replication agent.
After these steps have been successfully completed, the commit of any transaction that updates the specified file will wait for notification from the replication agent(s) that the transaction has been processed.
syncagent yes
When this option is specified, the Replication Agent operates as a synchronous agent, sending notification of its commit position to the primary server.
Note that for a Replication Agent to successfully connect to a source server as a synchronous agent, its unique ID must have already been registered with the source server. Otherwise, the connection fails with error 101 and the following messages are logged to ctreplagent.log:
Failed to update commit position on source server: 101
Check that this replication agent's ID (<agentid>) is registered as a synchronous replication agent on the source server
Synchronous replication state files on source server:
The source server creates the following tables to support synchronous replication:
Compatibility Notes:
To use this feature, the source and target servers and the Replication Agent must all include support for it. A new Replication Agent could work with old servers as long as it’s not configured to use synchronous replication.
A field was added to the snapshot structure, so the system snapshot version has increased from 21 to 22. This field’s value is displayed in SNAPSHOT.FCS for a text snapshot. The snapshot parse utility, ctsnpr, has been updated to handle this new SNAPSHOT.FCS format.