fdb-record-layer
fdb-record-layer copied to clipboard
Version mutations aren't cleared out by delete records where
Versionstamp-related mutations are currently stored in a buffer in the JVM and flushed during commit. This is to support multiple updates to the same record happening during a single transaction. Right before commit, this data is flushed to disk.
However, this data structure is not cleared out when there is a deleteRecordsWhere
operation. This means that if one:
- Inserts a record with a versionstamp then
- Issues a
deleteRecordsWhere
operation for that record, the result is - The versionstamp (and versionstamp indexes) get inserted into the database, but the record itself does not
This leads to a missing split point exception when the record is read. As a fix, the versionstamp keys should be cleared out during deleteRecordsWhere
as well. Alternatively, we could ban deleteRecordsWhere
if there are outstanding versionstamp operations.