Add timestamp to rebalancer progress output of the last state change
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
When calling `get_rebalance_progress()` you can see in what state shard move currently is. But there's no way to see how long it has been in that state. There's two main reasons this would be useful information:
1. Knowing how long a move has been in the current state could help point to problems (e.g. a move being stuck)
2. It would allow calculation of the estimated time the shard move will take to complete ([relevant xkcd](https://xkcd.com/612/))
This was suggested on Reddit here: https://www.reddit.com/r/PostgreSQL/comments/ph8zvk/shard_rebalancing_in_the_citus_101_extension_to/hbhcb88/?utm_source=reddit&utm_medium=web2x&context=3
Contributor guide
Research direction
Start by tracing the get_rebalance_progress() entry point in the Citus PostgreSQL extension and inspect how shard-move state changes are represented. Determine where the current state began and how progress output is assembled. Done means the output exposes a timestamp for the last state change, with coverage for the reported value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, postgresql
- Domain
- databases, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100