[ https://issues.apache.org/jira/browse/KAFKA-19428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lan Ding updated KAFKA-19428: ----------------------------- Description: |this is similar to KAFKA-19221. The IOException caused by writing max timestamp is currently ignored. {code:java} if (maxTimestampAndOffsetSoFar != TimestampOffset.UNKNOWN) Utils.swallow(LOGGER, Level.WARN, "maybeAppend", () -> timeIndex().maybeAppend(maxTimestampSoFar(), shallowOffsetOfMaxTimestampSoFar(), true)); {code} That could be an issue since we assume the last entry is the max timestamp after restarting. If the write fails, the loading log should re-build the index to ensure it catches the "correct" max timestamp.| was: 这类似于 KAFKA-19221。写入 max timestamp 导致的 IOException 当前被忽略。 {code:java} if (maxTimestampAndOffsetSoFar != TimestampOffset.UNKNOWN) Utils.swallow(LOGGER, Level.WARN, "maybeAppend", () -> timeIndex().maybeAppend(maxTimestampSoFar(), shallowOffsetOfMaxTimestampSoFar(), true)); {code} 这可能是一个问题,因为我们假设最后一个条目是重新启动后的最大时间戳。如果写入失败,加载日志应重新构建索引以确保它捕获“正确”的最大时间戳。 > IOException during writing max timestamp should not be ignored > -------------------------------------------------------------- > > Key: KAFKA-19428 > URL: https://issues.apache.org/jira/browse/KAFKA-19428 > Project: Kafka > Issue Type: Bug > Reporter: Chia-Ping Tsai > Assignee: Lan Ding > Priority: Minor > > |this is similar to KAFKA-19221. The IOException caused by writing max > timestamp is currently ignored. > > {code:java} > if (maxTimestampAndOffsetSoFar != TimestampOffset.UNKNOWN) > Utils.swallow(LOGGER, Level.WARN, "maybeAppend", () -> > timeIndex().maybeAppend(maxTimestampSoFar(), > shallowOffsetOfMaxTimestampSoFar(), true)); > {code} > > That could be an issue since we assume the last entry is the max timestamp > after restarting. If the write fails, the loading log should re-build the > index to ensure it catches the "correct" max timestamp.| -- This message was sent by Atlassian Jira (v8.20.10#820010)