Skip to content

fix "eventCounter" increase bug in append() #104

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 1 commit into
base: trunk
Choose a base branch
from
Open

fix "eventCounter" increase bug in append() #104

wants to merge 1 commit into from

Conversation

hangc0276
Copy link

In append() function, when the "batchCounter" is equal to batchSize, flush() will be called, which may throw exceptions when the network jitter happens on HDFS. Once exception happens, the event appended to the batch will be rollback, but the "eventCounter" has already been increased, which will make the "eventCounter" wrong value. So, the "eventCounter" should be increased after flush() happens.

In append() function, when the "batchCounter" is equal to batchSize, flush() will be called, which may throw exceptions when the network jitter happens on HDFS. Once exception happens, the event appended to the batch will be rollback, but the "eventCounter" has already been increased, which will make the "eventCounter" wrong value. So, the "eventCounter" should be increased after flush() happens.
@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.

2 participants