Skip to content

FLUME-3205:Remove unnecessary 'synchronized' in ResettableFileInputStream #192

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

Open
wants to merge 15 commits into
base: trunk
Choose a base branch
from

Conversation

tcsdn
Copy link

@tcsdn tcsdn commented Dec 26, 2017

I found no concurrent access to ResettableFileInputStream object in flume code.
Remove 'synchronized' will improve performance of SpoolDirectorySource.
Tested with a file of 200MB,with 'synchronized' it took 9 seconds to read the file.
Without 'synchronized' it took 7 seconds.

rgoers and others added 13 commits November 2, 2017 23:01
KafkaChannelTest had quite a few test methods so during the build sometimes it caused a timeout. Refactoring it to smaller test classes decrease the chance of timeouts.

This closes apache#183

Reviewers: Miklos Csanady, Ferenc Szabo

(Viktor Somogyi via Ferenc Szabo)
Set surefire version to the latest and configure it
to rerun failed tests.
This way the flaky tests will not break the build as often.

This closes apache#182

Reviewers: Ferenc Szabo

(Miklos Csanady via Ferenc Szabo)
Current derby version contains security vulnerabilities.
This update will upgrade to a later version.

This closes apache#184

Reviewers: Ferenc Szabo

(Miklos Csanady via Ferenc Szabo)
…ctly

This closes apache#188

Reviewers: Tristan Stevens, Miklos Csanady

(Ferenc Szabo via Denes Arvay)
This change upgrades the netty library to 3.10.6 and also adds netty-all 4.1.17

This closes apache#155

Reviewers: Miklos Csanady

(Ferenc Szabo via Denes Arvay)
@tcsdn
Copy link
Author

tcsdn commented Dec 26, 2017

@harishreedharan
Can you help me review the change?

@bessbd
Copy link
Member

bessbd commented Dec 27, 2017

Hi @guangxian ,

Thank you for the PR!

I've taken a look at the change and it seems to be a nice catch!

Even though there might be no concurrent access to the method in the Flume codebase, there might be access "from the outside". Thus, it might be a good idea to make this change in a backwards compatible way. (Ie. extract the "contents" of the method and leave a synchronized read that calls the non-synchronized, new one or something like that.)

Please, let me know what you think.

Thank you,

Donat

@tcsdn
Copy link
Author

tcsdn commented Dec 27, 2017

@bessbd Thank you for review. I add a NonSyncResettableFileInputStream class. Let ResettableFileInputStream extends NonSyncResettableFileInputStream. Please review it.

@asfgit
Copy link

asfgit commented Aug 17, 2018

Can one of the admins verify this patch?

waidr pushed a commit to waidr/flume that referenced this pull request Jul 24, 2019
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.

5 participants