Validating replication set record counts

For a limited set of business classes, you can obtain a count of the records that were replicated for the business class. This can then be used to compare with the number of expected records. The following conditions must be met to enable a count of replicated records:

  • The replication set cannot be based on a business class with an indicator field.
  • The replication set must be active.
  • The replication set must be defined as Current Data replication, that is, not the replication of audit data.
  • The replication business class must have been initially replicated or the Disable Incremental Replication field has not been selected.
  • The replication set business class must have a create stamp and an update stamp.
  • The replication set must not include any related replicates.

Any replication sets valid for this feature that had been replicated prior to setting the enable.record.count.sync parameter value to true must be manually synchronized by running the replication set's Synchronize Record Count action. This action cannot run while a replication is active or unfinished and vice versa. The Synchronize Record Count action is a background action and must complete successfully for the Expected Number Of Records field value to be updated. The expected number of records should match the number of records that exist (that is, are not deleted) in the target system or output files.

Once the value is synched up, replication moving forward should keep the value in sync. You can also rerun the Synchronize Record Count action to validate. When the expected number of records is set by running the Synchronize Record Count action, it is only expected to match the target system after a replication is done and if no subsequent changes have been made to the source data. For example, if a delete is done and the Synchronize Record Count action is run without a replication being run, that record will not be counted. Then, when the replications is run, it will be subtracted again from the count since the delete is replicated.

It is best to run the Synchronize Record Count action shortly after a replication finishes and before source data changes. This also assumes the data did not change during replication. Also, it should be run in a quiet period, and that to match, the replicated data must have been ingested into the target system.

Resetting a replication also impacts the use of this feature. Doing a reset will back out any creates that happened after the time being reset to. Also, If any reset is done to a replication set or replication set business class, and the target system is not cleaned up, there can be a mismatch. An example:

Assume you run several replications, then delete a record, then reset the replication set business class (without replicating the delete), and then replicate again, If the target system was not cleaned up after the reset and before replicating, then the target system will still have the deleted record. The first replication that happened after the reset was not incremental and thus only sent records that were not deleted. Deleted records are only sent on an incremental replication.

Note: Enabling this feature causes a subtle change in initial replications. Without this change, an initial replication will potentially include records created after the replication started. The next incremental replication will include those again. That is not generally an issue in the target systems since the latest revision wins. However, because this would be an issue for tracking counts, once this feature is enabled, initial replication will not include creates that happen after a replication starts. Those creates will then be sent when the next incremental replication runs.
  1. Set up the enable.record.count.sync configuration parameter.
    1. Log into the application data area and access the Landmark Administration Console.
    2. Navigate to Other > System Configuration Parameters > Other > By Residence Category.
    3. Filter the top list on the category "Replication."
    4. Filter the lower list on the Configuration Parameter Keys panel on the key "enable.record.count.sync."
    5. Click Create Parameter.
    6. In the Value field, specify true.
    7. Click Submit.
  2. Create a replication set that meets the conditions listed above.
  3. Register the schema for the replication set and run the replication.
  4. Verify that the Expected Number Of Records field now exists in the Business Class form for the replication set.
  5. Verify that the value in the Expected Number of Records field matches the value of the number of records in the replication file.