Teradata PT supplies the following return codes for two types of synchronization:
- TD_SYNC_TELINFO - Synchronize the TELINFO communication area from the main to the worker instances, and do not proceed until all instances reach this barrier.
- TD_SYNC_Barrier - Do not proceed until all instances reach this barrier.
The Teradata PT parallel synchronization is main instance driven. All worker instances will receive the same synchronization return code in the same phase. The main instance, however, may receive a different synchronization return code. In these cases, the action taken should follow the synchronization code returned by the main instance. The following table lists possible synchronization return code combinations and the proper action to take.
Received by Main | Received by Worker | Suggested Action |
---|---|---|
TD_SYNC_Barrier | TD_SYNC_Barrier | Call the method again which returned the barrier code after all instances reach this barrier. |
TD_SYNC_Barrier | TD_END_Method | Main calls the method again which returned the barrier code. Workers wait to call the next method until Main receives TD_END_Method. |
TD_SYNC_TELINFO | TD_SYNC_Barrier | Main calls the GetTELINFO function to get the TELINFO area and passes a copy of the TELINFO area to each of the workers. Workers call the PutTELINFO function to process the main's TELINFO area. Main and workers call the method again which returned the barrier code after all instances reach this barrier and after TELINFO area has been synchronized. |
TD_SYNC_TELINFO | TD_SYNC_TELINFO | Main calls the GetTELINFO function to get the TELINFO area and passes a copy of the TELINFO area to each of the workers. Workers call the PutTELINFO function to process the main's TELINFO area. Main and workers call the method again which returned the barrier code after all instances reach this barrier and after TELINFO area has been synchronized. |
TD_END_Method | TD_END_Method | Proceed to next method after all instances receive TD_END_Method. |
Usage Notes
- The main instance job must be started before starting the worker instance jobs
- The CLIv2 environment variable THREADONOFF must be set to one for running the Teradata PT multi-threaded application. See Teradata® Call-Level Interface Version 2 Reference for Workstation-Attached Systems, B035-2418 for details about this variable.