Synchronizes and forces the end of networked transactions for the current job.
This page describes the legacy ZSYNC
command. The ZSYNC
command is considered legacy as of Caché 2010.2 because its only use is to support the obsolete Distributed Cache Protocol (DCP). ZSYNC
should not be used in new programming. It is described here solely for compatibility with legacy applications.
synchronizes and forces the conclusion of all network transactions for the current job. You can also use ZSYNC
in non-networked applications that might later be run in a networked environment. Simply place it at the end of each complete transaction.
ensures that if multiple updates to a global (SET
operations) are synchronized by LOCK
operations, that READ
s of that global return those updates in the correct order. It does this by synchronizing delock operations across a network. When a delock occurs on an existing lock, any updates to a global that have been initiated (on any system) before the delock is initiated will be completed before the delock completes.
is used with Distributed Cache Protocol (DCP). ZSYNC
performs no operation on a system configured for an Enterprise Cache Protocol (ECP) data server. ECP uses synchronous-commit transactions to perform similar synchronization functionality. Because ECP is commonly used with Caché server system networks and clusters, your use of ZSYNC
may be limited. For further details on ECP, see the Caché Distributed Data Management Guide
An optional postconditional expression. Caché executes the command if the postconditional expression is true (evaluates to a nonzero numeric value). Caché does not execute the command if the postconditional expression is false (evaluates to zero). For further details, refer to Command Postconditional Expressions
in Using Caché ObjectScript
Depending on the operation requested, network errors are reported at different times. Errors for synchronous operations, such as LOCK
, are reported immediately through the normal error trap on the command that performed the error.
Errors for asynchronous operations, such as SET
, may be reported either immediately or after a delay.
Delayed errors return as a result of buffered asynchronous operations. When a job invokes either SET
, processing can continue on the client while the operation on the server completes. In this case, a special interrupt trap may occur sometime later in the program. The error code returned is identical to the error that originally occurred on the server.
When you use the ZSYNC
command to synchronize the activity of clients and servers, you force the return of any asynchronous errors. That is to say, all global errors return to the job before the ZSYNC
command lets applications synchronize activity on network servers. Executing this command forces the completion of all network transactions for this job. Do not use this command at the end of an update transaction that completes the filing of all global nodes on all servers, because it forces any delayed errors to be returned. In other words, all global errors are delivered to the job before the ZSYNC
© 1997-2019 InterSystems Corporation, Cambridge, MA