Product Documentation

c-treeACE V10.0 Release Notes

Previous Topic

Next Topic

Lock Restoration when Local Record Reads Fail

When a local record read fails with error TR_RDIF_ERR (856, Transactional replication: Failed to read record for update: local record differs from master record ), the local c-treeACE process now restores the lock state of the local and master records to their states prior to the record read operation.

To restore the master record lock state, the local server calls the ctReplMasterControl() function on the master server. This function is intended to support additional operations on the master server. At present, it accepts a mode parameter having the value ctMASTERCTLrstlok and a data parameter that is set to the data file number for the master file for which we want to restore the lock state of the record we just read.

If the call to ctReplMasterControl() fails, the local server writes one of the following messages to CTSTATUS.FCS and fails the record read operation with the error <error_code>:

ctTranReplGetFullRecord: Failed to unlock master record: <error_code>

ctTranReplReadMasterRecord: Failed to unlock master record: <error_code>

This behavior is designed such that it is easy to tell if a master Server does not support this function. In that case, the error code will likely be error SFUN_ERR (170, bad function number).

TOCIndex