Database mirroring

Automatically translated from English

When integrating the log file, 4D stops at the first error and doesn’t return any error message. Reasons for integration errors could be a damaged log, by example because of a bad hard disk or software error during writing. If that error happens at the end, no problem; but it could also be at the start or in the middle of the log. In this case, the data after the error might be useful.

Now, when the integration fails in standard mode, you can try integration in auto-repair mode. In this case, 4D tries to resolve the error encountered, doesn’t stop the integration, and returns the error list.

The errors fixed automatically by 4D are:

  • If the journal requests to add a record, but this record already exists in data, 4D updates the record.
  • If the journal requests to update a record, but this record doesn’t exist, 4D adds the record.
  • If the journal requests to delete a record, but this record doesn’t exist, 4D does nothing.

The new command syntax is:
INTEGRATE MIRROR LOG FILE (pathName ; operationNum ; {numMode {; errObject}})

  • pathName: Name or pathname of the log file to be integrated
  • operationNum: Number of the last integrated operation (or -2 to integrate the whole file)
  • numMode: 0 for strict mode (actual mode), 1 for the auto-repair
  • errObject: object

Example of errObject:
{"operations":
[
{
"operationType":24,
"operationName":"Create record",
"operationNumber":2,
"contextID":48,
"timeStamp":"2015-07-10T07:53:02.413Z",
"dataLen":24,
"recordNumber":0,
"tableID":"F4CXXXXX",
"tableName":"Customers",
"fields": {
"1": 9,
"2": "test value",
"3": "2003-03-03T00:00:00.000Z",
"4": "BlobPath: Table 1/Field 4/Data_9ACB28F1A2744FDFA5822B22F18B2E12.png",
"8": "BlobID: 2"
}
},
{...}
]
}

An example database is available to demonstrate the new functionality.

Example Database

Note: the INTEGRATE MIRROR LOG FILE command only works with 4D Server. You must open this database with 4D Server, if you want to test the new integration mode.

For more details, please take a look at the 4D v15 R4 Upgrade manual.

Vanessa Talbot

• Product Owner •

Vanessa Talbot joined 4D Program team in June, 2014. As a Product Owner, she is in charge of writing the user stories then translating it to functional specifications. Her role is also to make sure that the feature implementation delivered is meeting the customer need.

Since her arrival, she has worked to define key features in 4D. She has worked on most of preemptive multi-threading new features and also on a very complex subject: the new architecture for engined application. Vanessa has a degree from Telecom Saint-Etienne. She began her career at the Criminal Research Institute as a developer for the audiovisual department. She has also worked in media and medical fields as expert in technical support, production as well as documenting new features.