fdb-record-layer
fdb-record-layer copied to clipboard
Uncommitted version index entries are not visible
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.