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: record tracker does not support concurrent event batch removal #431

Conversation

ludovic-boutros
Copy link
Contributor

@ludovic-boutros ludovic-boutros commented Apr 25, 2024

This PR aims to fix the issue #423.

The record tracker uses ConcurrentNavigableMap iterators.
These iterators are Weakly-Consistent iterators.
That means that a thread will not see reflected changes made by another concurrent thread.
Therefore, events can be removed multiple times and the total number of event is not accurate and can become a negative number.

The idea of this fix is to first make sure that the total number of event never become a negative number anymore and given the strategy, we don't need to clean the event batches in parallel. Only one thread needs do the job at some point.

Another approach would be to use the batch input parameter of the function removeAckedEventBatches, but I did not want to change the design too much.

@ludovic-boutros ludovic-boutros force-pushed the fix-concurrent-delete-in-record-tracker branch from 077178b to 62c39d6 Compare April 26, 2024 15:29
@ludovic-boutros
Copy link
Contributor Author

I have rewritten the code using a far simpler approach.

@wojtekzyla
Copy link
Collaborator

Hi @ludovic-boutros. I took over this project after @VihasMakwana. I'll look into this PR

Copy link

github-actions bot commented May 6, 2024

Unit Test Results

173 tests   173 ✅  38s ⏱️
 24 suites    0 💤
 24 files      0 ❌

Results for commit 62c39d6.

@ludovic-boutros
Copy link
Contributor Author

Hello @wojtekzyla, any news on this issue? This is a critical issue for my customer.

@wojtekzyla wojtekzyla merged commit 8c5d933 into splunk:develop May 20, 2024
16 checks passed
@ludovic-boutros
Copy link
Contributor Author

Thank you, @wojtekzyla! Would it be possible to make a release, please?

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