KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Auto-Repair Mode on Mirror Server
PRODUCT: 4D | VERSION: 15 R4 | PLATFORM: Mac & Win
Published On: August 4, 2016

4Dv15R4 introduces a new feature for Mirroring. This new feature is an add on to the INTEGRATE MIRROR LOG FILE command. The command now requires an additional second parameter and can take up to two additional optional parameters after that totaling a possible of 4 parameters.

The second parameter is an in out parameter that contains the operation number of the last integrated operation for the command to know where to start or a -2 to start at the first operation and will contain the last operation integrated after execution.

This value is useful incase an error occurs during integration and the mirror breaks, so that the number can be used for debugging purposes and the error can be handled by code.

The parameters of interest are the two new optional parameters. The first optional parameter toggles the mode of the integration with 0 being the default strict mode and 1 being the auto-repair mode. In strict mode the integration will behave as before and an error will be triggered as normally, such as if a record being modified or deleted is not found.

In auto-repair mode, since the entire record's data is stored in the operation, the system is more leniant. If a record is being modified, but the record does not exist, then the record will be created with the post-modified data, while if a record is deleted but it does not exist, nothing will happen. In these cases an error is not thrown and the integration continues without stopping.

The last optional parameter allows all of the repairs to be logged in a 4D Object so that it can be referenced just in case.