Skip to content

Round-robin partitioner skips the first receiver and crashes on no receivers #9584

Description

@Ma77Ball

What happened?

The round-robin partitioner does not deal tuples evenly: it skips receiver 0 on the first cycle (the first tuple goes to receiver 1), and it throws ArithmeticException when there are no receivers.

How to reproduce?

Run a workflow whose edge uses round-robin partitioning across multiple downstream workers; the first tuple is sent to the second receiver and receiver 0 only starts receiving on the second cycle. In code, RoundRobinPartitioner.getBucketIndex increments roundRobinIndex before emitting it (so it starts at 1) and computes % receivers.length with no guard for an empty receiver set.

Version/Branch

main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions