electric icon indicating copy to clipboard operation
electric copied to clipboard

Detect race condition when creating a new shape

Open balegas opened this issue 7 months ago • 2 comments

When creating a new shape we start tracking LR stream for changes that match that shape to reconcile it with the result of initial query for the shape.

While the chances are small, it is possible that between starting a new transaction and querying the xmin for that transaction, some transactions that have a xid greater than xmin might have already been processed (and dropped) at the server.

The solution discussed is to have a fixed-size buffer of transactions in Electric to be able to reconcile the shape state.

balegas avatar Jul 15 '24 11:07 balegas