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: Don't process anchor if it has already been processed #1566

Merged
merged 1 commit into from
May 30, 2023

Conversation

bstasyszyn
Copy link
Contributor

Just before posting an anchor to the message queue, check if the anchor has already been processed. This greatly reduces the number of duplicate anchors sent to the queue and will improve overall performance.

closes #1565

@cla-bot cla-bot bot added the cla-signed label May 26, 2023
@codecov
Copy link

codecov bot commented May 26, 2023

Codecov Report

Patch coverage: 62.50% and project coverage change: -0.08 ⚠️

Comparison is base (af348ed) 88.16% compared to head (e555fc2) 88.09%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1566      +/-   ##
==========================================
- Coverage   88.16%   88.09%   -0.08%     
==========================================
  Files         227      227              
  Lines       21485    21538      +53     
==========================================
+ Hits        18943    18973      +30     
- Misses       1634     1649      +15     
- Partials      908      916       +8     
Impacted Files Coverage Δ
pkg/observer/observer.go 82.65% <42.85%> (-1.03%) ⬇️
pkg/anchor/handler/credential/handler.go 72.58% <51.06%> (-1.55%) ⬇️
pkg/anchor/linkstore/linkstore.go 93.63% <81.81%> (-3.37%) ⬇️
pkg/activitypub/httpsig/signer.go 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Just before posting an anchor to the message queue, check if the anchor has already been processed. This greatly reduces the number of duplicate anchors sent to the queue and will improve overall performance.

closes trustbloc#1565

Signed-off-by: Bob Stasyszyn <Bob.Stasyszyn@securekey.com>
@fqutishat fqutishat merged commit e0596de into trustbloc:main May 30, 2023
@bstasyszyn bstasyszyn deleted the 1565 branch May 30, 2023 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't process anchor if it has already been processed or if processing is pending
2 participants