-
Notifications
You must be signed in to change notification settings - Fork 31
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
Change audit orchestration and implement latest
strategy
#60
Conversation
f59dabe
to
f595cb4
Compare
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!
Only thing I'd change are a few naming suggestions. The main one is that I think the name selection.rs
describes what's being done here better than generator.rs
.
One suggestion for a future PR is that we include within the audit's DB record which selection strategy it was triggered by.
f003e3f
to
67a4351
Compare
See #63 |
67a4351
to
cf2914c
Compare
All suggested changes have been made |
can you rebase now that #59 is merged. |
cf2914c
to
ac02eed
Compare
Rebased on |
has conflicts now... probably from the other one I merged. I'll get this merged and deployed tomorrow if the conflicts can get resolved by then. Thanks again for all the great work. |
ac02eed
to
b7dba23
Compare
Rebase on |
b7dba23
to
42b610d
Compare
latest
strategy
42b610d
to
77638d8
Compare
Co-authored-by: mrferris <[email protected]>
77638d8
to
86e3726
Compare
Testing of the |
Description
Updates the audit logic. This enables
glados-audit
to perform multiple audit strategies within the one binary.The PR includes the logic for the
latest
strategy and stubs for additional strategies.Closes #37.
Dependencies
Overview
Note: Glados-monitor is unaffected. It continues to watch the chain tip of a non-portal node
and push content keys into the glados database.
Multiple audit strategies are defined. Any (or all) may be invoked by spawning a new thread.
Each spawned thread sends audit tasks via a multi-producer single-consumer channel. Task-creating
threads do not alter the glados database.
An audit task is a content key from the the glados database that is expected to be in a portal node. Tasks are created according to different strategies:
latest
implementedrandom
stubfailed
stub<additional unimplemented strategies may be added later>
A single thread watches the task channel and performs audits on anything received. Audit results
are stored in the glados database by this thread only, and no database locking is therefore required.
When
glados-audit
is started, all strategies are commenced. Any unimplemented strategy logs a warning.A flag could later be added to chose a strategy/strategies. E.g.,
Changes
selection
module to handle the different strategies.SelectionStrategy
enumUsage
Testing
A test database generator is created that can be used for different strategies. See doctests for more.
Checklist
latest
logicNot addressed
The following may be completed in a different PR(s).
failed
strategyrandom
strategy