Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import static com.automq.stream.s3.wal.common.RecordHeader.RECORD_HEADER_SIZE;
import static com.automq.stream.s3.wal.common.RecordHeader.RECORD_HEADER_WITHOUT_CRC_SIZE;

@SuppressWarnings("NPathComplexity")
public class RecoverIterator implements Iterator<RecoverResult> {
private static final Logger LOGGER = LoggerFactory.getLogger(RecoverIterator.class);
private final ObjectStorage objectStorage;
Expand Down Expand Up @@ -126,13 +125,6 @@ static List<WALObject> getContinuousFromTrimOffset(List<WALObject> objectList, l
return Collections.emptyList();
}

if (trimOffset != -1 && objectList.get(startIndex).startOffset() > trimOffset) {
for (int i = startIndex; i < objectList.size(); i++) {
LOGGER.warn("There is hollow before trim offset, drop discontinuous object: {}", objectList.get(i));
}
return Collections.emptyList();
}

int endIndex = startIndex + 1;
for (int i = startIndex + 1; i < objectList.size(); i++) {
if (objectList.get(i).startOffset() != objectList.get(i - 1).endOffset()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,6 @@ public static Stream<Arguments> testRecoverIteratorGetContinuousFromTrimOffsetDa
List.of(mockWALObject(0, 10), mockWALObject(10, 20), mockWALObject(30, 40)),
10L,
List.of(mockWALObject(10, 20))
),
Arguments.of(
"trimmed and hollow",
// When the object-10-20 doesn't write successfully and the broker halt, the hollow happens.
List.of(mockWALObject(0, 10), mockWALObject(30, 40)),
10L,
List.of()
)
);
}
Expand Down
Loading