MatrixGate Fault Tolerance Mechanism

This document describes the fault tolerance mechanism in MatrixGate.

MatrixGate internally uses external tables to insert data into the target table in micro-batches. Therefore, data is ingested in batches, and if any single row has a formatting error, the entire batch would previously fail.

Starting from version 4.3, MatrixGate introduces a fault tolerance mechanism. A single malformed row no longer prevents the rest of the data from being ingested. MatrixGate returns information about the erroneous row and logs the error.

Note!
Fault tolerance applies only to data formatting errors. If a constraint violation occurs (e.g., duplicate key in a unique index), the entire batch will still fail.

1 Error Information

Unlike earlier versions, where any invalid data would result in an HTTP 500 response, MatrixGate now returns HTTP 200 even when errors occur. The response body includes details about the problematic rows. For example:

At line: 2
missing data for column "c3"

2 Threshold Control

Fault tolerance is not unlimited. The tolerance threshold is controlled by the GUC parameter: gp_reject_limit. When the number of error rows exceeds 5 * gp_reject_limit, the batch insert fails.

For more detailed usage, refer to MatrixGate.