4D Blog

Home Product Database mirroring

Database mirroring

April 14, 2016

Product

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.

Discuss

Tags Database, Journal, Scalability, v15 R4, v16

Latest related posts

  • May 20, 2025

    Automatic Refresh of OEM Build Licenses

  • May 16, 2025

    New class to handle incoming TCP connections

  • April 29, 2025

    Discover your AI-powered writing assistant in 4D Write Pro

Vanessa Talbot
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.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor
Subscribe to 4D Newsletter

© 2025 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy