-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[pulsar io] make KafkaSourceRecord ack() non-blocking to avoid deadlock #11435
Conversation
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.
LGTM
@dlg99 do you mind taking aa look as well ? is this fixing the deadlock you found ? |
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.
lgtm.
I didn't run the integration tests (they are not enabled on the CI), I expect @nlu90 did that.
And Here's the integration test result run on my local laptop:
|
The `ack()` method of the `AbstractKafkaSourceRecord` should be non-blocking. Otherwise there'll be deadlock for pulsar-client-io thread and the main `public/default/debezium-mongodb-source-0` thread. And further blocks the whole debezium connector to work correctly. 1. remove the blocking `future.get()` call from `ack()` 2. move the commit logic into callbacks (cherry picked from commit b3892ee)
### Motivation The `ack()` method of the `AbstractKafkaSourceRecord` should be non-blocking. Otherwise there'll be deadlock for pulsar-client-io thread and the main `public/default/debezium-mongodb-source-0` thread. And further blocks the whole debezium connector to work correctly. ### Modifications 1. remove the blocking `future.get()` call from `ack()` 2. move the commit logic into callbacks
### Motivation The `ack()` method of the `AbstractKafkaSourceRecord` should be non-blocking. Otherwise there'll be deadlock for pulsar-client-io thread and the main `public/default/debezium-mongodb-source-0` thread. And further blocks the whole debezium connector to work correctly. ### Modifications 1. remove the blocking `future.get()` call from `ack()` 2. move the commit logic into callbacks
The `ack()` method of the `AbstractKafkaSourceRecord` should be non-blocking. Otherwise there'll be deadlock for pulsar-client-io thread and the main `public/default/debezium-mongodb-source-0` thread. And further blocks the whole debezium connector to work correctly. 1. remove the blocking `future.get()` call from `ack()` 2. move the commit logic into callbacks
) The `ack()` method of the `AbstractKafkaSourceRecord` should be non-blocking. Otherwise there'll be deadlock for pulsar-client-io thread and the main `public/default/debezium-mongodb-source-0` thread. And further blocks the whole debezium connector to work correctly. 1. remove the blocking `future.get()` call from `ack()` 2. move the commit logic into callbacks Co-authored-by: Neng Lu <[email protected]>
### Motivation The `ack()` method of the `AbstractKafkaSourceRecord` should be non-blocking. Otherwise there'll be deadlock for pulsar-client-io thread and the main `public/default/debezium-mongodb-source-0` thread. And further blocks the whole debezium connector to work correctly. ### Modifications 1. remove the blocking `future.get()` call from `ack()` 2. move the commit logic into callbacks
Motivation
The
ack()
method of theAbstractKafkaSourceRecord
should be non-blocking. Otherwise there'll be deadlock for pulsar-client-io thread and the mainpublic/default/debezium-mongodb-source-0
thread. And further blocks the whole debezium connector to work correctly.Modifications
future.get()
call fromack()
Verifying this change
Documentation
For contributor
For this PR, do we need to update docs?
No. Internal bug fix.