LanceDB Engineer Weston Pace: The Core Disagreement on Table Formats Lies Not in Data Files, but in the Coordination Mechanism for Concurrent Writes
The fundamental reason table formats exist is that data changes while files do not; therefore, all modifications are expressed as the creation of new files. This raises a critical question: when multiple writers submit simultaneously, whose set of new files becomes the 'current version'? Weston Pace points out that the choice of this atomic coordination mechanism—relying on a zero-infrastructure solution dependent on filesystem `put-if-not-exists` semantics versus a centralized solution relying on external services—has profound implications for the performance and complexity of table formats, with no universal solution.
Once written, files are essentially immutable, whereas data naturally requires modification. Rows need correction, new observations must be recorded, and old records must be deleted. This contradiction is the sole reason for the existence of table formats: since files cannot be modified, changes are expressed by creating new files. Appending a row writes a new file; deleting a row writes a marker file; compacting data writes a batch of new files; even acquiring and releasing table locks result in new files. The cost is that at any given moment, a single table corresponds to multiple files, some of which are not data files but deletion markers or indexes. Consequently, someone must define a set of rules specifying which files are currently valid and what role each plays.
Writing the rules themselves is not difficult. The true difficulty lies in this: when two writers simultaneously wish to submit their respective sets of new files, how does one become the 'current version' while the other fails? Weston Pace refers to this problem as the 'atomic kernel' of table formats and notes that all table formats—regardless of whether they are called timelines, catalogs, or other names—ultimately rely on some mechanism to synchronize concurrent writers. The choice of this mechanism has profound impacts on the performance and complexity of the table format, and it clearly divides the design space into two categories.