-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: Initial support for cooperative-sticky rebalancing #407
base: main
Are you sure you want to change the base?
Conversation
Fix one bug in StreamProcessor where it assumed the passed assignments are replacing the old ones. Our consumer backends mostly work as-is, and are already passing the right values in callbacks.
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.
Looks good!
Were you wanting to merge + publish as-is or do more testing against this branch?
Is it worth including a test that fails against the current cluster but works with newer versions? Attempting to commit on an existing partition during a rebalance might do it.
# ProcessingStrategyFactory that we made in Rust: Remove | ||
# create_with_partitions, replace with create + | ||
# update_partitions | ||
logger.error( |
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.
can we downgrade to warning if this is expected to happen on a regular basis?
@@ -245,6 +256,10 @@ def test_consumer_polls_when_paused(self) -> None: | |||
assert consumer.paused() == [] | |||
|
|||
|
|||
class TestKafkaStreamsIncrementalRebalancing(TestKafkaStreams): |
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.
unused?
# Second partition assigned | ||
offsets_p1 = {Partition(topic, 1): 0} | ||
assignment_callback(offsets_p1) | ||
|
||
create_args, _ = factory.create_with_partitions.call_args | ||
assert factory.create_with_partitions.call_count == 2 | ||
assert create_args[1] == offsets_p1 | ||
assert create_args[1] == {**offsets_p1, **offsets_p0} |
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.
was this test change related to your other changes? since there's no cooperative rebalancing here, seems like the assertions should stay the same?
@@ -161,6 +161,7 @@ def __init__( | |||
) | |||
|
|||
configuration = dict(configuration) | |||
self.__assignment_strategy = configuration.get("partition.assignment.strategy") |
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.
sorry i said the wrong thing earlier, this should be group.protocol
Fix one bug in StreamProcessor where it assumed the passed assignments
are replacing the old ones.
Our consumer backends mostly work as-is, and are already passing the
right values in callbacks.