Skip to content

Fix Producer.poll wakeable early return#2297

Open
Jeremy Gu (wgu9) wants to merge 1 commit into
confluentinc:masterfrom
wgu9:fix-producer-poll-wakeable-early-return
Open

Fix Producer.poll wakeable early return#2297
Jeremy Gu (wgu9) wants to merge 1 commit into
confluentinc:masterfrom
wgu9:fix-producer-poll-wakeable-early-return

Conversation

@wgu9

Copy link
Copy Markdown

Fixes #2215.

Summary

  • return from wakeable Producer.poll() once rd_kafka_poll() serves producer events
  • tighten the existing wakeable producer integration test so a full-timeout wait after delivery is caught
  • add a changelog entry

Validation

  • git diff --check
  • .venv/bin/python -m py_compile tests/integration/producer/test_producer_wakeable_poll_flush.py
  • .venv/bin/black --check tests/integration/producer/test_producer_wakeable_poll_flush.py
  • .venv/bin/isort --check-only tests/integration/producer/test_producer_wakeable_poll_flush.py
  • .venv/bin/flake8 tests/integration/producer/test_producer_wakeable_poll_flush.py
  • built editable install against librdkafka v2.15.0-RC1
  • DYLD_LIBRARY_PATH=/private/tmp/librdkafka-2.15.0-RC1-install/lib .venv/bin/python -c "import confluent_kafka; print(confluent_kafka.version()); print(confluent_kafka.libversion())"
  • DYLD_LIBRARY_PATH=/private/tmp/librdkafka-2.15.0-RC1-install/lib .venv/bin/pytest -q tests/test_Wakeable.py::test_producer_wakeable_poll_interruptibility_and_messages tests/test_Wakeable.py::test_producer_wakeable_poll_edge_cases

I also attempted tests/integration/producer/test_producer_wakeable_poll_flush.py::test_poll_message_delivery_with_wakeable_pattern; it reached trivup cluster setup but could not complete locally because the Docker daemon was not running for confluentinc/cp-schema-registry:7.6.0.

@confluent-cla-assistant

Copy link
Copy Markdown

🎉 All Contributor License Agreements have been signed. Ready to merge.
✅ wgu9
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

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.

Producer.poll(timeout) blocks for full timeout after delivery callback fires (regression in 2.13.0)

1 participant