PlanetScale

Achieving data consistency with the consistent lookup Vindex

Apr 29, 2024Harshit Gangal, Deepthi Sigireddi
Achieving data consistency with the consistent lookup Vindex
SummaryAI, from the source post

This post introduces the Consistent Lookup Vindex in Vitess, a mechanism to maintain data consistency between sharded user tables and their corresponding lookup Vindex tables without resorting to expensive 2PC for all DML operations. It details the three-connection transaction sequence (Pre, Main, Post) and the locking strategies employed during delete and insert operations to ensure that queries always return consistent results with respect to the user table, even if the Vindex tables temporarily hold stale data. The post also addresses update operations and the handling of duplicate key errors during inserts.

More from the Neki Query Performance trail