Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFKA-16017: Checkpoint restored offsets instead of written offsets #15044

Merged
merged 8 commits into from
Dec 21, 2023
Prev Previous commit
Fix checkstyle issues
  • Loading branch information
cadonna committed Dec 20, 2023
commit 75ada37afe9533be3989d51f023b7ac5708c65cf
2 changes: 1 addition & 1 deletion checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@

<!-- Streams tests -->
<suppress checks="ClassFanOutComplexity"
files="(RecordCollectorTest|StreamsPartitionAssignorTest|StreamThreadTest|StreamTaskTest|TaskManagerTest|TopologyTestDriverTest|KafkaStreamsTest).java"/>
files="(RecordCollectorTest|StreamsPartitionAssignorTest|StreamThreadTest|StreamTaskTest|TaskManagerTest|TopologyTestDriverTest|KafkaStreamsTest|EosIntegrationTest).java"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could have probably solved this checkstyle issue by moving the test to a separate file but I think it makes sense to keep it in EosIntegrationTest to avoid starting an additional embedded Kafka.


<suppress checks="MethodLength"
files="(EosIntegrationTest|EosV2UpgradeIntegrationTest|KStreamKStreamJoinTest|RocksDBWindowStoreTest|StreamStreamJoinIntegrationTest).java"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ private <K, V> void ensureCommittedRecordsInTopicPartition(final String topic,
final int numberOfRecords,
final Class<? extends Deserializer<K>> keyDeserializer,
final Class<? extends Deserializer<V>> valueDeserializer) throws Exception {
final long timeoutMs = 2*DEFAULT_TIMEOUT;
final long timeoutMs = 2 * DEFAULT_TIMEOUT;
final int maxTries = 10;
final long deadline = System.currentTimeMillis() + timeoutMs;
int tries = 0;
Expand All @@ -1210,7 +1210,7 @@ private <K, V> void ensureCommittedRecordsInTopicPartition(final String topic,
timeoutMs
);
++tries;
if(consumerRecords.stream().anyMatch(record -> record.partition() == partition)) {
if (consumerRecords.stream().anyMatch(record -> record.partition() == partition)) {
return;
}
if (tries >= maxTries) {
Expand Down