fdb-record-layer
fdb-record-layer copied to clipboard
Fixes #2573: Delete PrimaryKeySegmentIndex entries when files are deleted
Since I new this would involve a lot of extracting of interfaces, and moving code I thought it might be easier to go commit-by-commit, and have some pretty simple commits for that kind of stuff.
Some of the merges a little later on didn't go super smoothly, so it might be better to diff the 3 versions of:
LucenePrimaryKeySegmentIndex
(v1
, v2
and the interface).
I was unsure whether to take Lucene's approach, and copy things to avoid breaking things, or extract base classes. I made two different decisions here. Looking back it may make sense to have LucenePrimaryKeySegmentIndexV1
extend from LucenePrimaryKeySegmentIndexV2
based on implementations (perhaps better names would make that make more sense). However, given the corruption, and the current state of lucene, I expect V1 to be removed shortly, so it probably doesn't matter.