Criteria and/or method of recovery
|
Use this command for recovery
|
---|---|
If you do not anticipate concurrency conflicts to happen often, then you can recover from this incident by re-executing the failed reply message in a replica.
|
The command for re-executing the failed reply is:
MESSAGE msgname EXECUTE
|
If you anticipate concurrency conflicts to happen often and the re-execution of the message fails because of a concurrency conflict, you can execute the message using pessimistic table-level locking; this ensures the message execution is successful.
In this mode, all other concurrent access to the table affected is blocked until the synchronization message has completed.
|
The command for executing the message in pessimistic mode is:
MESSAGE msgname EXECUTE PESSIMISTIC
|
You can define the reply message to use table-level pessimistic locking when it is initially executed.
|
The command for requesting the reply message in pessimistic mode from the master is:
MESSAGE msgname GET REPLY PESSIMISTIC
|
As part of the MESSAGE FORWARD operation, the reply message can use table-level pessimistic locking when it is initially executed.
|
The command for requesting the reply message in pessimistic mode is:
MESSAGE msgname FORWARD TIMEOUT seconds PESSIMISTIC
The synopsis has been placed on two lines for layout purposes. The command is entered as one line.
|
solidDB® also allows you to define a table to be pessimistically locked using row-level locking. This approach is useful if lots of conflicting updates are expected on the table.
|
The command for setting a table to use pessimistic locking is:
ALTER TABLE tablename SET PESSIMISTIC
|