Add way to get a cursor's persisted PositionInfo from bookkeeper
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Motivation
While researching the solution for #18236, it would have been very helpful to have access to a cursor's persisted `PositionInfo` in Bookkeeper. In that bug's case, the persisted data in bookkeeper didn't align with the `PositionInfo` persisted in zookeeper, and verifying that was essential to finding the bug.
### Solution
I see two options:
1. Create a new admin http endpoint that allows a user with super user privileges permission to get a range of persisted entries from a cursor's ledger. The primary benefit of this solution is that it gives us the ability to investigate historical `PositionInfo`, which could be very helpful.
2. Update the `stats-internal` admin http result to also include the most recently persisted `PositionInfo`. One risk for this solution is that it increases the cost of `stats-internal`. However, that command is already a troubleshooting command, so that should be fine.
### Alternatives
None yet.
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Research direction
Start by reading #18236 and comparing the two proposed entry points: a new admin HTTP endpoint or the existing stats-internal result. Determine how persisted PositionInfo is exposed from Bookkeeper and whether historical entries are required. Done means an authorized user can inspect the cursor's persisted PositionInfo for troubleshooting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100