Skip to content

Do not fail if no partitions assigned#15955

Open
kumarpritam863 wants to merge 30 commits intoapache:mainfrom
kumarpritam863:do_not_fail_if_no_members
Open

Do not fail if no partitions assigned#15955
kumarpritam863 wants to merge 30 commits intoapache:mainfrom
kumarpritam863:do_not_fail_if_no_members

Conversation

@kumarpritam863
Copy link
Copy Markdown
Contributor

This #14395 removed the client side stability check of the consumer group (which is rightly done). But since we have removed the check there will be more instances of invalid calls (class when rebalance is going on or happening frequently) and we should wait for the final rebalance to happen and simply return false.

@kumarpritam863
Copy link
Copy Markdown
Contributor Author

@bryanck @danielcweeks can you please review.

@@ -70,7 +70,7 @@ class Coordinator extends Channel {
private static final Logger LOG = LoggerFactory.getLogger(Coordinator.class);
private static final ObjectMapper MAPPER = new ObjectMapper();
private static final String COMMIT_ID_SNAPSHOT_PROP = "kafka.connect.commit-id";
private static final String TASK_ID_SNAPSHOT_PROP = "kafka.connect.task-id";
private static final String COORDINATOR_ID_SNAPSHOT_PROP = "kafka.connect.coordinator-id";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rename feels like an unnecessary clarification. They both really mean the same thing and updating an existing property causes more problems than it's worth. It's assumed that that the task identified is the coordinator.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielcweeks I completely agree with you. Will revert these changes.

Comment on lines +122 to +132
/**
* Finds the first (minimum) topic partition across all consumer group members.
*
* <p>The "first" partition is determined using {@link TopicPartitionComparator}, which orders
* {@link TopicPartition} instances lexicographically by topic name and, for equal topics, by
* ascending partition number.
*
* @param members the collection of consumer group members
* @return the first topic partition according to {@link TopicPartitionComparator}, or null if no
* partitions are assigned
*/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this documentation. The behavior is evident and this isn't publicly facing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielcweeks I added these for future devs contributing to have reference to this but will revert these as well.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants