Skip to content

Commit de2537c

Browse files
This fixes two kafka flaky tests. (quickwit-oss#6056)
The cause is complicated. When relying on localhost for connection, the client will first attempt ipv6 and then ipv4. This will cause a bunch of BrokerTransportFailure to be emitted by RdKafka. These errors will either fail the actor or fail the test assert. See quickwit-oss#6049 Co-authored-by: fulmicoton <paul.masurel@datadoghq.com>
1 parent f257557 commit de2537c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

quickwit/quickwit-indexing/src/source/kafka_source.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,8 @@ mod kafka_broker_tests {
872872

873873
fn get_source_config(topic: &str, auto_offset_reset: &str) -> (String, SourceConfig) {
874874
let source_id = append_random_suffix("test-kafka-source--source");
875+
// Setting explicitly ip v4 with `broker.address.family` is required
876+
// because of https://github.com/fede1024/rust-rdkafka/issues/809
875877
let source_config = SourceConfig {
876878
source_id: source_id.clone(),
877879
num_pipelines: NonZeroUsize::MIN,
@@ -882,6 +884,7 @@ mod kafka_broker_tests {
882884
client_params: json!({
883885
"auto.offset.reset": auto_offset_reset,
884886
"bootstrap.servers": "localhost:9092",
887+
"broker.address.family": "v4",
885888
}),
886889
enable_backfill_mode: true,
887890
}),

0 commit comments

Comments
 (0)