-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
KAFKA-1981 Make log compaction point configurable #1168
Conversation
…o feat-compaction-lag
Test unrelated to this PR failed. Closing and reopening. |
Tests passed locally. Re-opening. |
closing request pending changes based on KIP-58 review. |
@ewasserman hey, the vote passed a while back, but I'm not sure where things went from there... was there another PR that got merged? |
never mind, found the second PR. |
Gwen, the second PR is stalled waiting for KIP-33 (KAFKA-3163) to be merged.
|
@jkreps
Implements control over the portion of the head of the log that will not be compacted (i.e. preserved in detail).
The log cleaner can be configured retain a minimum amount of the uncompacted "head" of the log.
This is enabled by setting one or more of the compaction lags:
with similar per topic configurations:
These can be used to set constraints on the minimum message age, aggregate size, and/or count respectively that may be compacted. If none are set, all log segments are eligible for compaction except for the last segment, i.e. the one currently being written to. The active segment will not be compacted even if all of the compaction lag constraints are satisfied.
In particular this allows for the example use case described in the JIRA: "any consumer that is no more than 1 hour behind will get every message."
This contribution is my (Eric Wasserman's) original work and I license the work to the Kafka project under its open source license.