Symisc Vedis

An Embeddable Datastore Engine



Vedis C/C++ API Reference - Transaction Manager.

Syntax

int vedis_rollback(vedis *pStore);


Rollback a write-transaction on the specified datastore handle.


Description


If a write transaction is open, then all changes made within the transaction are reverted and the current write-transaction is closed (Dropping all exclusive locks on the target database, deletion of the journal file, etc.). Otherwise this routine is a no-op.


Parameters


pStore

Vedis datastore handle.


Return value


VEDIS_OK is returned on success. Any other return value indicates failure such as:


VEDIS_READ_ONLY: Read-only database.


VEDIS_BUSY: Another thread or process have an exclusive lock on the database. In this case, the caller should wait until the lock holder relinquish it.


VEDIS_IOERR: OS specific error.


VEDIS_NOMEM: Out of memory (Unlikely scenario).


VEDIS_ABORT: Another thread have released the database handle.


For a human-readable error message, you can extract the database error log via vedis_config() with a configuration verb set to VEDIS_CONFIG_ERR_LOG.


See also


vedis_begin, vedis_commit, vedis_open, vedis_close, vedis_config.



Symisc Systems
Copyright © Symisc Systems