Skip to content

SAMZA-2490: AsyncFlatmapOperatorImpl#handleClose should call transformFn.close()#1320

Merged
xinyuiscool merged 2 commits into
apache:masterfrom
Zhangyx39:handleClose
Mar 19, 2020
Merged

SAMZA-2490: AsyncFlatmapOperatorImpl#handleClose should call transformFn.close()#1320
xinyuiscool merged 2 commits into
apache:masterfrom
Zhangyx39:handleClose

Conversation

@Zhangyx39
Copy link
Copy Markdown
Contributor

Symptom: In beam samza runner, Op#close is not invoked during shutdown, which is not expected.

Cause: AsyncFlatmapOperatorImpl#handleClose() doesn't call transformFn.close(). Therefore the underlying transform function will never be closed.

Changes: Just invoke transformFn.close inside handleClose method should be enough.

Tests: Tested with a samza beam job. After the change, Op#close is able to function properly.

@xinyuiscool
Copy link
Copy Markdown
Contributor

Thanks for finding this bug. Can we add a unit test to prevent this happening again?

Copy link
Copy Markdown
Contributor

@xinyuiscool xinyuiscool left a comment

Choose a reason for hiding this comment

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

Looks great!

@xinyuiscool xinyuiscool merged commit 6685b28 into apache:master Mar 19, 2020
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