Full upsert to partial upsert
- Dominant language
- Java
- Stars
- 6.1k
- Forks
- 1.5k
- Avg merge
- 2d 55m
- Merged PRs (30d)
- 182
Description
When using the upsert functionality, it is possible to change the table config from full upsert to partial upsert. But when you make this change, the partial upsert config isn't picked up until you restart the server.
I think this is deliberate as we only create a new TableDataManager if one isn't already designed, otherwise, it uses one that was created for the [first segment added/replaced](https://github.com/apache/pinot/blob/master/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixInstanceDataManager.java#L482) on that server.
To me, this behaviour doesn't seem intuitive. I would expect one of the following to apply:
1. We aren't allowed to change the upsert functionality in this way and table validation should reject our attempts to do so.
2. We should create a new TableDataManager when a new segment is being added/replaced if we detect a change has been made to the table config.
But which of these should it be, or is there another option?
Contributor guide
Research direction
Start with the upsert configuration handling and the TableDataManager creation path in pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixInstanceDataManager.java, especially the linked line around segment addition or replacement. Trace how a full-to-partial upsert change is handled after the first segment, then establish whether validation or TableDataManager replacement is the intended behavior. Done means the chosen behavior is explicit and configuration changes no longer require an unexplained restart.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100