SegmentPurger does not handle schema evolution gracefully
- Dominant language
- Java
- Stars
- 6.1k
- Forks
- 1.5k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 189
Description
We ran into an issue where SegmentPurger failed due to schema evolution as follows:
- New columns were added into the schema.
- Table index was updated to have inverted index on some of the newly added columns.
- An explicit backfill was not performed.
When the SegmentPurger tried to purge older segments, it failed with the following error:
`java.lang.IllegalStateException: Cannot create inverted index for column: because it is not in schema`
This is likely because SegmentPurger used the schema in the segment as opposed to the schema in the controller.
It would be desirable for SegmentPurger to gracefully handle this scenario.
Contributor guide
Research direction
Start at SegmentPurger and trace how it chooses a schema when purging older segments; compare the segment schema with the controller schema in the reported schema-evolution case. Reproduce the added-column and inverted-index scenario without an explicit backfill, and consider the work done when purging completes without the reported IllegalStateException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100