Skip to content
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

CC-12530: do not throw exception on flush after task close #455

Merged
merged 2 commits into from
Oct 29, 2020

Conversation

levzem
Copy link
Contributor

@levzem levzem commented Oct 27, 2020

Signed-off-by: Lev Zemlyanov lev@confluent.io

Problem

the worker calls SinkTask::close followed by SinkTask::flush, but SinkTask::close closes the BulkProcessor which causes the consequent flush to throw an exception.

Solution

only flush if the `BulkProcessor is still open

Does this solution apply anywhere else?
  • yes
  • no
If yes, where?

Test Strategy

write a test that flushes after close

Testing done:
  • Unit tests
  • Integration tests
  • System tests
  • Manual tests

Release Plan

backport as far back as possible

@levzem levzem requested a review from a team as a code owner October 27, 2020 14:23
Signed-off-by: Lev Zemlyanov <lev@confluent.io>
Copy link
Member

@kkonstantine kkonstantine left a comment

Choose a reason for hiding this comment

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

Thanks. Couple of comments.

Signed-off-by: Lev Zemlyanov <lev@confluent.io>
Copy link
Member

@kkonstantine kkonstantine left a comment

Choose a reason for hiding this comment

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

LGTM

@levzem levzem merged commit ba8f7ee into confluentinc:5.0.x Oct 29, 2020
@levzem levzem deleted the fix branch October 29, 2020 17:45
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.

2 participants