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: Only run one DB expiry check per cluster at a time #824

Merged

Conversation

DRK3
Copy link
Collaborator

@DRK3 DRK3 commented Oct 18, 2021

Added a mechanism to the expiry service to allow it to coordinate with other Orb servers within a cluster so that they can ensure only one DB expiry check at a time.

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

closes #810

@cla-bot cla-bot bot added the cla-signed label Oct 18, 2021
@DRK3 DRK3 force-pushed the OnlyRunOneExpiryServicePerClusterAtATime branch from 0fa8aa6 to 3075755 Compare October 18, 2021 23:29
@codecov
Copy link

codecov bot commented Oct 18, 2021

Codecov Report

Merging #824 (50b3fbf) into main (2addba7) will increase coverage by 0.05%.
The diff coverage is 89.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #824      +/-   ##
==========================================
+ Coverage   89.38%   89.44%   +0.05%     
==========================================
  Files         144      144              
  Lines       12638    12700      +62     
==========================================
+ Hits        11297    11359      +62     
+ Misses        828      825       -3     
- Partials      513      516       +3     
Impacted Files Coverage Δ
cmd/orb-server/startcmd/params.go 79.92% <81.81%> (+0.04%) ⬆️
pkg/store/expiry/expiry.go 89.83% <90.62%> (-1.22%) ⬇️
cmd/orb-server/startcmd/start.go 73.80% <100.00%> (ø)
pkg/observer/pubsub.go 94.44% <0.00%> (ø)
...pub/service/inbox/httpsubscriber/httpsubscriber.go 100.00% <0.00%> (+9.87%) ⬆️

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 2addba7...50b3fbf. Read the comment docs.

@DRK3 DRK3 force-pushed the OnlyRunOneExpiryServicePerClusterAtATime branch from 3075755 to 8ea382b Compare October 18, 2021 23:49
@DRK3 DRK3 marked this pull request as ready for review October 19, 2021 14:29
@DRK3 DRK3 force-pushed the OnlyRunOneExpiryServicePerClusterAtATime branch from 8ea382b to 6834ac1 Compare October 20, 2021 19:50
@DRK3
Copy link
Collaborator Author

DRK3 commented Oct 20, 2021

@bstasyszyn I've updated this PR per our conversation earlier. Take a look and let me know. If it looks okay, I can improve the code coverage. Some of the cases to improve code coverage are going to be time-consuming to cover, so if I need to make any major changes I should do that first before writing unit tests for them.

@DRK3 DRK3 force-pushed the OnlyRunOneExpiryServicePerClusterAtATime branch from 6834ac1 to 95e4f48 Compare October 20, 2021 20:09
@DRK3 DRK3 force-pushed the OnlyRunOneExpiryServicePerClusterAtATime branch 2 times, most recently from f921c8c to de3d23e Compare October 20, 2021 20:31
@DRK3 DRK3 force-pushed the OnlyRunOneExpiryServicePerClusterAtATime branch 4 times, most recently from 0d257a8 to 4257bae Compare October 21, 2021 00:16
Added a mechanism to the expiry service to allow it to coordinate with other Orb servers within a cluster so that they can ensure only one DB expiry check at a time.

Signed-off-by: Derek Trider <Derek.Trider@securekey.com>
@DRK3 DRK3 force-pushed the OnlyRunOneExpiryServicePerClusterAtATime branch from 4257bae to 50b3fbf Compare October 21, 2021 00:19
@sandrask sandrask merged commit 4aedfef into trustbloc:main Oct 21, 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 expiry service to run on just one server within a cluster (or make it a separate service)
4 participants