sync

The sync operator checks instance liveness. Available only in the Enterprise Edition.

Synopsis

sync();

Library

The sync operator resides in the System library. Run the following query to load this library:

AFL% load_library('system');

Summary

The sync() operator returns success if all the instances are online and every SciDB instance sees at least one heartbeat from every other SciDB instance. Otherwise, sync() returns an error that indicates network connectivity issues such as:

SCIDB_LE_NO_QUORUM
SCIDB_LE_LIVENESS_MISMATCH 
SCIDB_LE_CONNECTION_ERROR
SCIDB_LE_RESOURCE_BUSY

Example

Use the sync() operator between loading a library and issuing queries. Here is a typical operator sequence in AFL:

  1. Enter:

    AFL% load_library('system');
  2. Then enter:

    AFL% sync()

If sync() completes successfully, you can safely issue queries.

 

Initial heartbeat propagation may necessitate executing the sync() operator several times before it returns successfully.  

If sync() fails, see Managing SciDB Instances for additional information.