showuon commented on code in PR #16959:
URL: https://github.com/apache/kafka/pull/16959#discussion_r1728306271
##########
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:
That's a really good point! Let me fix it.
--
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]