mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-12 10:32:27 -06:00
ChunkStores provide a Version() method so that anyone directly using a ChunkStore (e.g. BatchStoreAdaptor) can retrieve and check the version of the underlying store. remoteDatabaseServer checks the version of the ChunkStore it's backed by at startup, and then provides that version as an HTTP header to all clients. In Go, httpBatchStore checks this header anytime it gets a response from the server and bails if there's version skew. In Go, the responsibility for checking whether the running code and the data being accessed lies with the BatchStore layer. In JS, there is code in fetch.js that checks the header mentioned above. Towards #1561