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

feat: Parameters for unpublished op lifespan and expiry service interval #818

Conversation

DRK3
Copy link
Collaborator

@DRK3 DRK3 commented Oct 15, 2021

Also added in the registration for the database timeout command line flag, which was missing (which meant that the environment variable would have been the only way to set it before. Now using the --database-timeout flag will work too)

closes #808

Signed-off-by: Derek Trider Derek.Trider@securekey.com

@cla-bot cla-bot bot added the cla-signed label Oct 15, 2021
@codecov
Copy link

codecov bot commented Oct 15, 2021

Codecov Report

Merging #818 (1203cd5) into main (ef3a493) will decrease coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #818      +/-   ##
==========================================
- Coverage   89.56%   89.50%   -0.07%     
==========================================
  Files         143      144       +1     
  Lines       12502    12588      +86     
==========================================
+ Hits        11198    11267      +69     
- Misses        807      813       +6     
- Partials      497      508      +11     
Impacted Files Coverage Δ
cmd/orb-server/startcmd/params.go 81.05% <100.00%> (+0.51%) ⬆️
cmd/orb-server/startcmd/start.go 74.02% <100.00%> (+0.03%) ⬆️
pkg/store/operation/unpublished/store.go 92.72% <100.00%> (+0.13%) ⬆️
pkg/activitypub/vocab/util.go 77.77% <0.00%> (-9.73%) ⬇️
pkg/activitypub/vocab/anchoreventtype.go 91.73% <0.00%> (-4.94%) ⬇️
pkg/anchor/handler/proof/handler.go 84.21% <0.00%> (-2.83%) ⬇️
pkg/anchor/anchorevent/anchorevent.go 78.33% <0.00%> (-1.99%) ⬇️
pkg/activitypub/vocab/objecttype.go 84.87% <0.00%> (-1.10%) ⬇️
pkg/activitypub/vocab/vocab.go 100.00% <0.00%> (ø)
pkg/anchor/anchorevent/generator/generator.go
... and 4 more

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 ef3a493...1203cd5. Read the comment docs.

@DRK3 DRK3 force-pushed the ParametersForUnpublishedOperationLifespanAndExpiredDataCheckInterval branch 3 times, most recently from d45e890 to 3036271 Compare October 15, 2021 03:29
@DRK3 DRK3 marked this pull request as ready for review October 15, 2021 03:29
@@ -28,6 +28,8 @@ const (
defaultNodeInfoRefreshInterval = 15 * time.Second
defaultIPFSTimeout = 20 * time.Second
defaultDatabaseTimeout = 10 * time.Second
defaultUnpublishedOperationLifespan = time.Minute
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sandrask Do you think 1m is a good default. I'm thinking maybe 5m?

Copy link
Contributor

@sandrask sandrask Oct 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put it to 5m but it is not showstopper. @DRK3

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done - I've switched it to 5 minutes.

@DRK3 DRK3 force-pushed the ParametersForUnpublishedOperationLifespanAndExpiredDataCheckInterval branch from 3036271 to da3a433 Compare October 15, 2021 13:24
Also added in the registration for the database timeout command line flag, which was missing (which meant that the environment variable would have been the only way to set it before. Now using the --database-timeout flag will work too)

Signed-off-by: Derek Trider <Derek.Trider@securekey.com>
@DRK3 DRK3 force-pushed the ParametersForUnpublishedOperationLifespanAndExpiredDataCheckInterval branch from da3a433 to 1203cd5 Compare October 15, 2021 14:06
@DRK3 DRK3 merged commit 866f6ac into trustbloc:main Oct 15, 2021
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.

Allow unpublished operation lifespan and automatic data expiry to be configured
3 participants