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
chore: bump E2E tests for Kafka 3.7 #544
Conversation
6a70a49
to
c38861c
Compare
final ConsumerRecord<byte[], byte[]> record = consumer.poll(Duration.ofSeconds(1)).records(TP_0_0).get(0); | ||
assertThat(record.offset()).isEqualTo(newStartOffset); | ||
|
||
consumer.seekToBeginning(List.of(TP_0_0)); | ||
|
||
// with current retention logic, active segment is rotated, and no data is available locally. | ||
final List<ConsumerRecord<byte[], byte[]>> records = consumer.poll(Duration.ofSeconds(1)).records(TP_0_0); | ||
assertThat(records).isEmpty(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main change: validating that the active segment is not rotated is not correct anymore.
d7548eb
to
730adc4
Compare
@@ -49,7 +49,7 @@ public class RemoteLogMetadataTracker { | |||
private static final String REMOTE_LOG_METADATA_TOPIC = "__remote_log_metadata"; | |||
|
|||
private final KafkaConsumer<byte[], RemoteLogMetadata> consumer; | |||
private List<TopicPartition> partitions; | |||
private List<TopicPartition> metadataPartitions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separating "metadata" from "user" partitions.
@@ -94,21 +109,23 @@ abstract class SingleBrokerTest { | |||
static final TopicPartition TP_0_0 = new TopicPartition(TOPIC_0, 0); | |||
static final TopicPartition TP_0_1 = new TopicPartition(TOPIC_0, 1); | |||
static final TopicPartition TP_1_0 = new TopicPartition(TOPIC_1, 0); | |||
static final List<TopicPartition> TOPIC_PARTITIONS = List.of(TP_0_0, TP_0_1, TP_1_0); | |||
static final List<TopicPartition> USER_TOPIC_PARTITIONS = List.of(TP_0_0, TP_0_1, TP_1_0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, separating "metadata" from "user" partitions
* from remote storage</li> | ||
* <li>{@link SingleBrokerTest#remoteCleanupDueToRetention()}: wait for retention by size to remove data | ||
* from remote storage</li> | ||
* <li>{@link SingleBrokerTest#topicDelete()}: (unsupported) delete topic and validate data is removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unsupported == not implemented yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, it should be implemented eventually: https://issues.apache.org/jira/browse/KAFKA-15166
e2e/src/test/java/io/aiven/kafka/tieredstorage/e2e/SingleBrokerTest.java
Outdated
Show resolved
Hide resolved
b1e47e4
to
c66e109
Compare
Let next phase to test topic T0 and avoid additional dependency between phases.
3.7 has changed how local retention impacts the rotation of active segment.
c66e109
to
bb6d8b3
Compare
Kafka 3.7 have changed how local retention affects active segment: from now on, if local retention time is passed, then a new (empty) active segment is rollout.
This changes how the end-to-end tests validated deletion by retention.
Apart from this change, the PR includes some e2e test improvements: adding docs to make the sequence of steps on the end-to-end test easier to follow; some reorganization and renaming with the same purpose. See the commits for more detail.