fdb-record-layer icon indicating copy to clipboard operation
fdb-record-layer copied to clipboard

Uncommitted version index entries are not visible

Open alecgrieser opened this issue 6 months ago • 0 comments

We generally support read-your-writes semantics, and so uncommitted data is visible within the context of the transaction that writes it. However, this is broken for version indexes, where uncommitted data is not returned.

This can be seen, for example, by creating a version index and then saving records with incomplete versions (which is the default if store_record_versions is true for the meta-data). The index scan will return no results. Then commit the transaction, and re-open the store with a new transaction. This time, there will be data in the index corresponding to the previous records.

The issue here is that uncommitted version data lives in a separate data structure from the rest of the mutations. We'd need to update the index scan to mix in values from the version mutation scan with data from the version index to correctly return the records here.

alecgrieser avatar Aug 13 '24 15:08 alecgrieser