-
Notifications
You must be signed in to change notification settings - Fork 14.4k
KAFKA-17411: Use shared cache for Task offset sums #17715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
@mjsax @cadonna @ableegoldman Part 2 of KIP-1035. This actually makes use of the "startup Tasks" by caching their offset sums on startup and using that for rebalances instead of the We still use the |
Instead of reading Task state offsets for non-open Tasks from the `.checkpoint` file, we now maintain an in-memory cache of the latest changelog offsets for every Task on the instance. On start-up, this cache is seeded with the changelog offsets for every on-disk StateStore. Running Active and Standby Tasks then update this cache on every checkpoint to ensure it always reflects the offsets on-disk. This breaks the tight coupling between `TaskManager` and `.checkpoint` files, which will enable us to remove `.checkpoint` files in a later commit as part of KIP-1035.
f828c6e
to
fc7eeb8
Compare
Rebased against |
This PR is being marked as stale since it has not had any activity in 90 days. If you If you are having difficulty finding a reviewer, please reach out on the [mailing list](https://kafka.apache.org/contact). If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed. |
hey @nicktelford sorry this PR was neglected for so long, is it still ready for review? might need to be rebased first? |
@ableegoldman Yeah, that's not a surprise. I should be able to get to it next week, or maybe the week after. |
SG! Ping me again when it's ready 🙂 |
This PR is being marked as stale since it has not had any activity in 90 days. If you If you are having difficulty finding a reviewer, please reach out on the [mailing list](https://kafka.apache.org/contact). If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed. |
Instead of reading Task state offsets for non-open Tasks from the
.checkpoint
file, we now maintain an in-memory cache of the latest changelog offsets for every Task on the instance.On start-up, this cache is seeded with the changelog offsets for every on-disk StateStore. Running Active and Standby Tasks then update this cache on every checkpoint to ensure it always reflects the offsets on-disk.
This breaks the tight coupling between
TaskManager
and.checkpoint
files, which will enable us to remove.checkpoint
files in a later commit as part of KIP-1035.