XAP

Flush Redo Log to Disk

This is only relevant when the redo log swap type is SQLite.

Persisting the Redolog

You may need to manually persist the redolog in scenarios such as:

  • A cluster restart is required while the mirror to the remote database is disconnected.

  • A durable notification client is offline, and you need to save its pending messages.

For version 18.0.1 and later: A new REST APIClosed REpresentational State Transfer. Application Programming Interface An API, or application programming interface, is a set of rules that define how applications or devices can connect to and communicate with each other. A REST API is an API that conforms to the design principles of the REST, or representational state transfer architectural style. has been introduced to support this operation: POST /spaces/{id}/flushRedoLog, with the parameter copyToBackupDir=false. The copyToBackupDir parameter controls whether the redolog is copied to the backup folder.

For versions prior to 18.0.1: Refer to this GitHub example.

Upon System Shutdown

When a SpaceClosed Where GigaSpaces data is stored. It is the logical cache that holds data objects in memory and might also hold them in layered in tiering. Data is hosted from multiple SoRs, consolidated as a unified data model. needs to be undeployed or when there is a system shutdown while the redo log is not empty, the system will try to replicate to the targets. However, if the target is not available, or after timeout, the system will continue in shutdown.

In order to avoid loss of data, an option has been added to flush the memory portion onto the disk.

In order to enable this feature com.gs.redolog.flush.on.shutdown should be set to true

Implement Notification Interface

com.gigaspaces.utils.RedologFlushNotifier - This is an interface including a method with parameters including the full Space name, the redo log size, and the path to where this redo log is stored. This will enable the file to be saved to a safe place in order to use it to recover from if required.

This method will be called by GigaSpaces if flush is enabled and com.gs.redolog.flush.notify.class is set to a class implementing the RedologFlushNotifier interface. The related class, set:com.gs.redolog.flush.notify.class should be packaged to a jar and placed under gs-home/platform/ext

Shutdown Hook Timeout

In order to allow enough time for shutdown to perform the above actions, the shutdown hook timeout should be increased. The default is 10 seconds. The parameter to be updated is com.gs.shutdownhook.timeout (defined in seconds).

Example

A full example, including recovery steps can be found here in Git.