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

ungrouped RecordCountKey leaves data behind if dropped

Open ScottDugas opened this issue 7 months ago • 0 comments

If a RecordMetaData has an ungrouped RecordCountKey, and the RecordCountKey is removed, data will be left behind by checkVersion.

The code that clears existing data https://github.com/FoundationDB/fdb-record-layer/blob/b74cbc2e7abd93697740917ad5d41afadcef3737/fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/provider/foundationdb/FDBRecordStore.java#L4845

Uses:

context.clear(getSubspace().range(Tuple.from(RECORD_COUNT_KEY)));

which won't clear data that is stored at:

getSubspace().pack(Tuple.from(RECORD_COUNT_KEY));

ScottDugas avatar May 02 '25 19:05 ScottDugas