Home / Companies / PlanetScale / Blog / Post Details
Content Deep Dive

Achieving data consistency with the consistent lookup Vindex

Blog post from PlanetScale

Post Details
Company
Date Published
Author
Harshit Gangal, Deepthi Sigireddi
Word Count
1,526
Language
English
Hacker News Points
-
Summary

The text discusses how a consistent lookup Vindex is implemented in Vitess to ensure data consistency without using 2PC (Two Phase Commit). Vitess uses Vindexes, or indexes, to associate rows in a table with a designated address known as Keyspace ID. This enables efficient routing of queries in a sharded database. The consistent lookup Vindex is a type of Secondary Vindex that further enhances the efficiency and reliability of this mechanism by maintaining consistency between data tables and lookup indexes without using 2PC for all DML operations. Vitess uses three connections to perform DML operations, with carefully defined sequences of operations ensuring consistency even when record in the Vindex tables may be inconsistent. The text also provides examples of delete, insert, and update operations using consistent lookup Vindexes.