showuon commented on code in PR #16959:
URL: https://github.com/apache/kafka/pull/16959#discussion_r1728644453
##########
core/src/main/java/kafka/log/remote/RemoteLogManager.java:
##########
@@ -1254,6 +1255,13 @@ void cleanupExpiredRemoteLogSegments() throws
RemoteStorageException, ExecutionE
canProcess = false;
continue;
}
+
+ if
(RemoteLogSegmentState.COPY_SEGMENT_STARTED.equals(metadata.state())) {
+ // If the state is COPY_SEGMENT_STARTED and it's not
under copying process, this must be the previously
+ // failed copied state. We should clean it up directly.
+ danglingSegments.add(metadata);
+ continue;
Review Comment:
PR updated in this commit:
https://github.com/apache/kafka/pull/16959/commits/fc966752f36bb6769152ed92d85b8d97ada00003
. Also added test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]