SYNCPOINT in response to SYNCPOINT

In a complex distributed transaction, all the agents agree that the transaction should be committed.

Figure 1 shows the sequence of events for a successful syncpoint involving six conversing transactions:
Transaction A
  • is in conversation with transactions B and D. Before the syncpoint, its conversations with B and D are in send state.
  • is the syncpoint initiator with respect to transactions B and D.
Transaction B
  • is in conversation with transactions A, C, and E. Before the syncpoint, its conversation with A is in receive state, and its conversations with C and E are in send state.
  • is a syncpoint agent of transaction A, and the syncpoint initiator with respect to transactions C and E.
Transaction C
  • is in conversation with transaction B. Before the syncpoint, its conversation with B is in receive state.
  • is a syncpoint agent of transaction B.
Transaction D
  • is in conversation with transactions A and F. Before the syncpoint, its conversation with A is in receive state, and its conversation F is in send state.
  • is a syncpoint agent of transaction A, and the syncpoint initiator with respect to transaction F.
Transaction E
  • is in conversation with transaction B. Before the syncpoint, its conversation with B is in receive state.
  • is a syncpoint agent with respect to transaction B.
Transaction F
  • is in conversation with transaction D. Before the syncpoint, its conversation with D is in receive state.
  • is the only syncpoint agent of transaction D.
It illustrates the states and actions that occur when transactions issue SYNCPOINT requests. To write successful distributed applications you do not need to understand all the data flows that take place during a distributed syncpoint. In this example, the programmer is concerned only with issuing SYNCPOINT in response to finding a conversation in syncreceive state (state 9).
Figure 1. A distributed syncpoint with all partners running on CICS® Transaction Server for z/OS®, Version 5 Release 4
This figure shows the interactions and state changes during a syncpoint in a distributed transaction.
  1. Transaction A, which is in send state (state 2) on its conversations with transactions B and D, decides to end the distributed unit of work, and therefore issues a SYNCPOINT command.
  2. Transaction B sees that its half of its conversation with transaction A is in syncreceive state (state 9), so it issues a SYNCPOINT command. Transaction B is responding to a request from transaction A, but it also becomes the syncpoint initiator for transactions C and E, and must ensure that its conversations with these transactions are in a valid state for issuing a SYNCPOINT command. In this example, they are both in send state (state 2).
  3. Transaction C sees that its half of its conversation with transaction B is in syncreceive state (state 9), so it issues a SYNCPOINT command.
  4. Transaction E sees that its half of its conversation with transaction B is in syncreceive state (state 9), so it issues a SYNCPOINT command.
  5. Transaction D sees that its half of its conversation with transaction A is in syncreceive state (state 9), so it issues a SYNCPOINT command. Transaction D is responding to a request from transaction A, but it also becomes the syncpoint initiator for transaction F, and must ensure that its conversation with this transaction is in a valid state for issuing a SYNCPOINT command. In this example, it is in send state (state 2).
  6. Transaction F sees that its half of its conversation with transaction D is in syncreceive state (state 9), so it issues a SYNCPOINT command.
  7. All the transactions have now indicated, by issuing SYNCPOINT commands, that they are ready to commit their changes. This process begins with transaction F, which has no agents and has responded to "request commit" by issuing a SYNCPOINT command.
  8. The distributed syncpoint is complete and control returns to transaction A following the SYNCPOINT command.

The previous discussion of the SYNCPOINT command assumed that all the agent transactions were ready to take a syncpoint by issuing SYNCPOINT when their conversation entered syncreceive state (state 9).

If, however, an agent has detected an error, it can reject the syncpoint request with one of the following commands:
  • SYNCPOINT ROLLBACK (preferred response)
  • ISSUE ERROR
  • ISSUE ABEND
The SYNCPOINT ROLLBACK command enables a transaction to initiate a backout operation across the entire distributed unit of work. When it is issued in response to a syncpoint request, it has the following effects:
  1. Any changes made to recoverable resources by the transaction that issues the rollback request are backed out.
  2. The syncpoint initiator is also backed out (EIBRLDBK set).
This causes the syncpoint initiator to initiate a backout operation across the distributed unit of work.


dfhp6c0072.html | Timestamp icon Last updated: Monday, 5 June 2017