KAFKA-19952: Don't upload to remote if the segment had already expired according to remote retention configure#21361
KAFKA-19952: Don't upload to remote if the segment had already expired according to remote retention configure#21361jiafu1115 wants to merge 12 commits intoapache:trunkfrom
Conversation
…d according to remote retention configure Signed-off-by: Jian <fujian1115@gmail.com>
Signed-off-by: Jian <fujian1115@gmail.com>
Signed-off-by: Jian <fujian1115@gmail.com>
Signed-off-by: Jian <fujian1115@gmail.com>
Signed-off-by: Jian <fujian1115@gmail.com>
Signed-off-by: Jian <fujian1115@gmail.com>
Signed-off-by: Jian <fujian1115@gmail.com>
Signed-off-by: Jian <fujian1115@gmail.com>
Signed-off-by: Jian <fujian1115@gmail.com>
Signed-off-by: Jian <fujian1115@gmail.com>
Signed-off-by: Jian <fujian1115@gmail.com>
|
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 <fujian1115@gmail.com>
|
@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.