Skip to content

Move can_q_contain_fetched_msgs inside q_serve#4431

Merged
Emanuele Sabellico (emasab) merged 6 commits intomasterfrom
dev_poll_reset_bugFix
Sep 29, 2023
Merged

Move can_q_contain_fetched_msgs inside q_serve#4431
Emanuele Sabellico (emasab) merged 6 commits intomasterfrom
dev_poll_reset_bugFix

Conversation

@anchitj
Copy link
Copy Markdown
Contributor

@anchitj Anchit Jain (anchitj) commented Sep 13, 2023

Fixes #4421

Extended the existing test case to test if polling a queue forwarding to the consumer queue resets the max.poll.interval.ms. This test fails without the changes, but works with it.

Copy link
Copy Markdown
Contributor

@milindl Milind L (milindl) left a comment

Choose a reason for hiding this comment

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

Implementation looks okay, left some comments for the test.
Please add changelog.md entry too

Comment thread src/rdkafka_queue.c Outdated
do_test_rejoin_after_interval_expire(rd_true);
do_test_rejoin_after_interval_expire(rd_false, rd_false);
do_test_rejoin_after_interval_expire(rd_true, rd_false);
do_test_rejoin_after_interval_expire(rd_false, rd_true);
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 think we should add a test for the specific case that brought this bug to light, too, which uses rd_kafka_conf_set_consume_cb to set a consume_cb, and the calls rd_kafka_poll.

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.

Added a new test, though test_wait_event is unable to capture RD_KAFKA_EVENT_REBALANCE not sure why, so haven't added any assert in the test. But added a poll, which should fail if the consumer has left the group.

@anchitj Anchit Jain (anchitj) force-pushed the dev_poll_reset_bugFix branch 2 times, most recently from 77c65af to 69bdfa9 Compare September 29, 2023 12:22
Copy link
Copy Markdown
Contributor

@milindl Milind L (milindl) left a comment

Choose a reason for hiding this comment

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

Approved with minor comments

Comment thread tests/0089-max_poll_interval.c Outdated
Comment thread CHANGELOG.md Outdated
Comment thread tests/0089-max_poll_interval.c Outdated
Comment thread tests/0089-max_poll_interval.c Outdated
TEST_SAY("Consume callback\n");
}

static void do_test_max_poll_reset_with_consumer_cb(void) {
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.

Documentation comment above this test
We can also mention issue # for the original case

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.

Thanks, added.

@emasab Emanuele Sabellico (emasab) deleted the dev_poll_reset_bugFix branch September 29, 2023 14:54
Axel Andersson (axelandersson) added a commit to axelandersson/librdkafka that referenced this pull request Oct 5, 2023
* upstream/master:
  librdkafka v2.3.0 (confluentinc#4455)
  Fix for idempotent producer fatal errors, triggered after a possibly persisted message state (confluentinc#4438)
  Move can_q_contain_fetched_msgs inside q_serve (confluentinc#4431)
  [KIP-580] Exponential Backoff with Mock Broker Changes to Automate Testing. (confluentinc#4422)
  Update only the mklove version of OpenSSL to 3.0.11 (confluentinc#4454)
  Permanent errors during offset validation should be retried (confluentinc#4447)
  Increased flexver request size for Metadata request to include topic_id size (confluentinc#4453)
  Fix loop of OffsetForLeaderEpoch requests on quick leader changes (confluentinc#4433)
  Fix for stored offsets not being committed if they lacked the leader epoch (confluentinc#4442)
  Add leader epoch to control messages (confluentinc#4434)
  Refactored tmpabuf and fixed an insufficient buffer allocation (confluentinc#4449)
  Work around KIP-700 restrictions for DescribeCluster [KIP-430]
  [admin] KIP-430: Add authorized operations to describe API
  Fix segfault if assignor state is NULL, (confluentinc#4381)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

max.poll.interval.ms is not reset while using consume_cb

3 participants