-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat: Add handler to expiry service #855
Conversation
Codecov Report
@@ Coverage Diff @@
## main #855 +/- ##
==========================================
+ Coverage 89.38% 89.41% +0.02%
==========================================
Files 148 148
Lines 13125 13160 +35
==========================================
+ Hits 11732 11767 +35
Misses 855 855
Partials 538 538
Continue to review full report at Codecov.
|
Add handler to expiry service such that it can inspect items to be deleted and take some action (e.g. log them in case they were not expected to be found) Also, add expiry handler to witness store in order to log unsuccessful anchors (e.g. anchors that failed due to not having enough witnesess) Closes trustbloc#854 Signed-off-by: Sandra Vrtikapa <sandra.vrtikapa@securekey.com>
anchors = append(anchors, a) | ||
} | ||
|
||
logger.Errorf("failed to process anchors: %s", anchors) |
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.
There's always an error being logged here? Is this right?
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.
@DRK3 yes, we wanted to record when anchors don't get processed (e.g. they didn't get enough witnesses)
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.
I see, any anchors here represent ones that didn't get processed, so you log here and then when this function returns the expiry service deletes them
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.
correct
Add handler to expiry service such that it can inspect items to be deleted and take some action (e.g. log them in case they were not expected to be found)
Also, add expiry handler to witness store in order to log unsuccessful anchors (e.g. anchors that failed due to not having enough witnesess)
Closes #854
Signed-off-by: Sandra Vrtikapa sandra.vrtikapa@securekey.com