When to use outer transactions

This topic discusses outer transactions and provides recommendations for when it is useful to issue queries and updates inside an outer transaction as opposed to running individual queries for various tasks.

Typically, you use Integrator ETL or another data loading mechanism to load data and configuration into the Endeca Server, for a specific data domain. You load data by making Web service requests to the Data Ingest Web Service or requests to the Bulk Load Interface. Each Web service request represents its own set of operations in the data domain, and succeeds or fails on its own — it is in itself a transaction. These transactions, because they do not include any other transactions inside them, are also known as inner transactions.

If some inner transactions in the Endeca data domain succeed and others fail, the resulting data domain may reflect only a partially updated data set (if, for example, some updates did not succeed). Typically, however, you may want to ensure that data changes from an entire set of data-updating requests to the data domain hosted in the Endeca Server either complete or fail as a unit, so that the resulting set of index files represents an entirely updated data domain. You may also want to make sure that end users do not access intermediate states of the data in the front-end application, but instead can only have access to the pre-update state of the index files (while the data-updating graph completes), and then seamlessly transition to querying the data domain that has been fully updated.

To guarantee that your updates either completely succeed or fail, make your requests inside an outer transaction.

An outer transaction is a set of operations performed in the data domain that is viewed as a single unit. If an outer transaction is committed, this means that all of the data and configuration changes made during this transaction have completed successfully and are committed to the data domain's index.

To run an outer transaction, you can either use Integrator ETL or issue requests with the Transaction Web Service. This way, you can run inner transactions inside an outer transaction. Typically, running inner transactions (each of which represents a request to the Dgraph) inside an outer transaction is useful for running updates. Once such an outer transaction completes, an update to your records is guaranteed to be fully committed to the index of your data domain.