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: Add minimum activity age param to anchor sync task #1087

Merged
merged 1 commit into from
Feb 2, 2022

Conversation

bstasyszyn
Copy link
Contributor

A minimum activity age parameter is added to the anchor sync task such that the activity needs to be older than this value before it is processed (according to the "published" time of the activity).

For example, the anchor sync task should not process activities that are younger than 1 minute. The minimum age is configurable via the ANCHOR_EVENT_MIN_ACTIVITY_AGE startup parameter (default 1m).

closes #1085

Signed-off-by: Bob Stasyszyn Bob.Stasyszyn@securekey.com

@cla-bot cla-bot bot added the cla-signed label Feb 2, 2022
A minimum activity age parameter is added to the anchor sync task such that the activity needs to be older than this value before it is processed (according to the "published" time of the activity).

For example, the anchor sync task should not process activities that are younger than 1 minute. The minimum age is configurable via the ANCHOR_EVENT_MIN_ACTIVITY_AGE startup parameter (default 1m).

closes trustbloc#1085

Signed-off-by: Bob Stasyszyn <Bob.Stasyszyn@securekey.com>
@codecov
Copy link

codecov bot commented Feb 2, 2022

Codecov Report

Merging #1087 (2c04571) into main (570c10a) will decrease coverage by 0.03%.
The diff coverage is 95.12%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1087      +/-   ##
==========================================
- Coverage   89.23%   89.20%   -0.04%     
==========================================
  Files         161      161              
  Lines       15694    15722      +28     
==========================================
+ Hits        14005    14025      +20     
- Misses       1035     1042       +7     
- Partials      654      655       +1     
Impacted Files Coverage Δ
cmd/orb-server/startcmd/params.go 80.88% <85.71%> (+0.01%) ⬆️
cmd/orb-server/startcmd/start.go 73.99% <100.00%> (+0.03%) ⬆️
...tivitypub/service/anchorsynctask/anchorsynctask.go 87.57% <100.00%> (+2.47%) ⬆️
...pub/service/inbox/httpsubscriber/httpsubscriber.go 90.90% <0.00%> (-9.10%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 570c10a...2c04571. Read the comment docs.

@fqutishat fqutishat merged commit 0919bed into trustbloc:main Feb 2, 2022
@bstasyszyn bstasyszyn deleted the 1085 branch February 2, 2022 18:49
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.

Anchor sync task should not process new activities immediately
2 participants