Skip to content

Remove Thread#run to avoid unexpected interruption.#2170

Merged
repeatedly merged 1 commit into
masterfrom
output-remove-thread-run
Nov 9, 2018
Merged

Remove Thread#run to avoid unexpected interruption.#2170
repeatedly merged 1 commit into
masterfrom
output-remove-thread-run

Conversation

@repeatedly

Copy link
Copy Markdown
Member

Thread#run causes unexpected interruption and it affects
the behaviour of some libraries, e.g. DataError in zlib.
Use condition variable instead to handle thread execution.

This change is based on jl2005's #1984 patch.

Ref #1847 / #1903

Signed-off-by: Masahiro Nakagawa repeatedly@gmail.com

Thread#run causes unexpected interruption and it affects
the behaviour of some libraries, e.g. DataError in zlib.
Use condition variable instead to handle thread execution.

This change is based on jl2005's #1984 patch.

Signed-off-by: Masahiro Nakagawa <repeatedly@gmail.com>
@repeatedly repeatedly added bug Something isn't working v1 labels Nov 8, 2018
@repeatedly repeatedly self-assigned this Nov 8, 2018
@repeatedly repeatedly requested a review from cosmo0920 November 8, 2018 01:00

@cosmo0920 cosmo0920 left a comment

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.

Looks good.
I've confirmed that DataError does not occur with @jl2005 's test case: f63e5d9.
Adding test cases for removing Thread#run is future work?

@repeatedly

Copy link
Copy Markdown
Member Author

@cosmo0920 ji2005's test case is passed with old implementation because the problem is rare timing issue with ruby's VM and C extension implementation.
So writing test is hard. We need feedback from users with fluentd v1.3.

@cosmo0920 cosmo0920 left a comment

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.

LGTM!

@cosmo0920 ji2005's test case is passed with old implementation because the problem is rare timing issue with ruby's VM and C extension implementation.
So writing test is hard. We need feedback from users with fluentd v1.3.

I see. ji2005's test case seems to be unstable.

@repeatedly repeatedly merged commit f287c60 into master Nov 9, 2018
@repeatedly repeatedly deleted the output-remove-thread-run branch November 11, 2018 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants