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

Fix race condition in data prepper sources using e2e acknowledgements #3039

Merged
merged 2 commits into from
Jul 18, 2023

Conversation

kkondaka
Copy link
Collaborator

Description

Fix race condition in data prepper sources using e2e acknowledgements.
There is a race condition in DataPrepper sources using e2e acks. This change fixes the race condition by changing the order in which events are added to acknowledgement set and buffer. The events must be added to acknowledgement set before they are added to the buffer.

Resolves #3038

Issues Resolved

#3038

Check List

  • New functionality includes testing.
  • New functionality has been documented.
    • New functionality has javadoc added
  • [X ] Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
Copy link
Collaborator

@engechas engechas left a comment

Choose a reason for hiding this comment

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

Code LGTM, build is failing

Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
@kkondaka kkondaka merged commit 1edf97c into opensearch-project:main Jul 18, 2023
24 checks passed
chenqi0805 pushed a commit that referenced this pull request Jul 19, 2023
…#3039)

* Fix race condition in data prepper sources using e2e acknowledgements

Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>

* Fixed checkStyle error

Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>

---------

Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
Co-authored-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
Signed-off-by: George Chen <qchea@amazon.com>
@kkondaka kkondaka deleted the e2e-ack-fix branch May 13, 2024 05:51
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.

[BUG] Race condition in DataPrepper sources using e2e acknowledgements
3 participants