Using a RowLoader to Load Existing Data

When you use GemFire XD as a cache, you can configure a SQL data loader that is triggered to load data from a backend repository on a miss in GemFire XD.

When an incoming query request for a uniquely-identified row cannot be satisfied by the distributed cache, the loader is invoked to retrieve the data from an external source. GemFire XD locks the associated row and prevents concurrent readers that are trying to fetch the same row from overloading the backend database.

Note: When a loader is configured for a table, performing a select statement against the table internally fetches and inserts data into a GemFire XD table. Because of this behavior, it is possible to receive a constraint violation when you query a table that is configured with a loader (for example, if the loader attempts to insert data from a backend database that violates a table constraint in GemFire XD).