-
Notifications
You must be signed in to change notification settings - Fork 14.9k
KAFKA-19952: Don't upload to remote if the segment had already expired according to remote retention configure #21361
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
…d according to remote retention configure Signed-off-by: Jian <[email protected]>
Signed-off-by: Jian <[email protected]>
Signed-off-by: Jian <[email protected]>
Signed-off-by: Jian <[email protected]>
Signed-off-by: Jian <[email protected]>
Signed-off-by: Jian <[email protected]>
Signed-off-by: Jian <[email protected]>
Signed-off-by: Jian <[email protected]>
Signed-off-by: Jian <[email protected]>
Signed-off-by: Jian <[email protected]>
Signed-off-by: Jian <[email protected]>
|
Thanks for the PR, @jiafu1115.
|
|
@kamalcph thanks for your comments. And I need more time to research/understand your statements and give the feedback later. |
It is not a blocker for the KIP-1241. You can document it as same as the existing behaviour; the segment will be uploaded to remote, then allowed for local-log deletion. |
|
@kamalcph After a deeper dive, I understand it now. Thanks a lot for pointing this out. The maxTimestamp in log segments may not increase monotonically due to the use of ProduceTime, or because of NTP / system clock adjustments. It is different with offset. Based on this, I think I should update the code by changing 'continue' to "break" in the scan process with the next segment be evaluated. This way, the behavior will keep consistent with the all time-based retention deleting logic. I can take some time to work on this change. Once I feel it’s ready, I’d really appreciate your help to review it again. For now, I’ll focus on the KIP as first. Thanks again. |
storage/src/main/java/org/apache/kafka/server/log/remote/storage/RemoteLogManager.java
Show resolved
Hide resolved
Signed-off-by: stroller <[email protected]>
|
@kamalcph Sorry to trouble you again. I’ve just completed an update to the code. |



This is another solution for the bug #21049 (The solution is to check on
deleting) Also it is one demo solution for the comment from @kamalcph
for KIP:1241
The idea is to skip the upload and update the LogStartOffset. Checking
on the uploading.