-
Notifications
You must be signed in to change notification settings - Fork 7
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] Optimization in the consistency check to skip recent deleted flows #70
Conversation
Adapted and updated unit tests
Ignored too-many-lines for now
Added _add_archived_flows method Extracted is_recent_flow static method Changed consistency check to skip recent deleted flows Changed _del_matched_flows_store to also archive flows
For the record, here's the result of end-to-end tests with this branch:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. It is very nice that you were able to quickly design a solution for this optimization. The set of tests presented in the PR description shows the solution is secure and effective. Thanks for fixing this, @viniarck
Awesome. Thanks for reviewing, Italo. |
Fixes #69
Description of the change
This PR introduced an optimization opportunity that @italovalcy has found on this comment, so, now in the same way that consistency tries to skip a pass if a recent flow was added it's doing the same thing for recent deleted flows. I've also cherry picked some commits from PR #45, that I worked sometime ago for archived flows, however, the main difference to avoid putting more pressure on store house is that I only kept the parts we'd need for this feature with storage in memory, so no additional IO/DB pressure is expected. I think it's a win-win situation since now we've got the archived flows partly landed as well, and then when we have a new NoSQL backend it's a matter of writing and reading from there.
Release notes
[2022.1.2] - 2022-02-07
Changed
is_recent_flow
static method_del_matched_flows_store
to also archive flowsAdded
_add_Archived_flows
methodLocal tests
I've also tried to reproduce the issue with the commands and scripts that @italovalcy provided on this comment, in three executions, no alien deleted consistency checks were observed. Also, exploring
archived_flows
in memory, the 200 flow entries were there, all of them withdelete
reason: