damccorm opened a new pull request, #41667:
URL: https://github.com/apache/beam/pull/41667

   Note: this PR was auto-generated by tooling. Before moving it out of draft, 
the author has done a full review of the PR, specifically evaluating it on the 
following criteria:
   
   - The PR is an appropriate fix for the issue (e.g. we're not changing a test 
to avoid a bug)
   - The PR is a simple fix to the issue (e.g. we're not adding infra when we 
could just modify a test)
   - The PR is not covering for other problems (e.g. if we're bumping timeouts, 
it is not because we're covering for a performance problem)
     
   Full details of the methodology of generation and review can be found here - 
https://docs.google.com/document/d/14lj7ECVov4T4EdwmIzNlWrRGE3lLDMOwX5xUMGzaLoc/edit?usp=sharing
   
   If you have concerns with the PR or with the underlying methodology used to 
generate this, please comment below - they will be addressed by the author not 
the tooling :)
   
   ### Summary
   Update the `Create Kafka topic` step in 
`.github/workflows/beam_PerformanceTests_xlang_KafkaIO_Python.yml` and 
`.github/workflows/beam_StressTests_Java_KafkaIO.yml` to create topic `beam` 
with `--replication-factor 3` instead of `--replication-factor 1`.
   
   ### Root Cause
   Both workflows deploy the 3-broker Kafka cluster from 
`.test-infra/kubernetes/kafka-cluster/`, where:
   - `05-kafka/10broker-config.yml` configures `default.replication.factor=3` 
and `min.insync.replicas=2`.
   - `05-kafka/configmap-config.yaml` (run asynchronously by the `kafka-config` 
Kubernetes Job) creates topic `beam` with `--replication-factor 3`.
   
   However, the workflow's `Create Kafka topic` step ran:
   ```bash
   kafka-topics.sh --create --topic beam --zookeeper zookeeper:2181 
--partitions 1 --replication-factor 1
   ```
   Whenever this workflow step executed before the `kafka-config` Job finished 
creating `beam`, it created `beam` with `replication-factor=1`, which is 
strictly less than the broker's `min.insync.replicas=2`. Subsequent writes from 
`KafkaWriter` (`acks=all`) then deterministically failed with:
   ```
   Caused by: org.apache.kafka.common.errors.NotEnoughReplicasException: 
Messages are rejected since there are fewer in-sync replicas than required.
   ```
   In passing runs (e.g., 
[45384783522](https://github.com/apache/beam/actions/runs/45384783522)), the 
`kafka-config` Job won the race (`Topic 'beam' already exists`), leaving `beam` 
with `replication-factor=3`.
   
   ### Recent Occurrences
   2 occurrences on `master` in the last 7 days:
   - [45605057281](https://github.com/apache/beam/actions/runs/45605057281) 
(`2026-11-25`) — `PerformanceTests xlang KafkaIO Python` (`Created topic 
"beam".` with RF=1 → `NotEnoughReplicasException`)
   - [45165814169](https://github.com/apache/beam/actions/runs/45165814169) 
(`2026-11-23`) — `PerformanceTests xlang KafkaIO Python` (`Created topic 
"beam".` with RF=1 → `NotEnoughReplicasException`)
   
   ### Verification
   - Validated both workflow YAML files with `yaml.safe_load`.
   - Triggered `beam_PerformanceTests_xlang_KafkaIO_Python.yml` on this PR 
branch.
   
   ### Verification
   - Triggered `beam_PerformanceTests_xlang_KafkaIO_Python.yml` workflow run on 
branch: [`45628470402`](https://github.com/apache/beam/actions/runs/45628470402)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to