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: Purge documents in operation-queue DB #1554

Merged
merged 1 commit into from
May 5, 2023

Conversation

bstasyszyn
Copy link
Contributor

Use the DB expiration service to purge documents from the operation-queue database if they have not been processed for a configurable time (default 24 hours).

Also:

  • Fixed a bug where a document wasn't deleted from the operation-queue DB in a certain situation.
  • Added a limit to the number of operations from another server instance that can be reposted after detecting that the server is dead (default 10,000). This was done in order to prevent the system from becoming overloaded.

closes #1547
closes #1548

Use the DB expiration service to purge documents from the operation-queue database if they have not been processed for a configurable time (default 24 hours).

Also:
- Fixed a bug where a document wasn't deleted from the operation-queue DB in a certain situation.
- Added a limit to the number of operations from another server instance that can be reposted after detecting that the server is dead (default 10,000). This was done in order to prevent the system from becoming overloaded.

closes trustbloc#1547
closes trustbloc#1548

Signed-off-by: Bob Stasyszyn <Bob.Stasyszyn@securekey.com>
@cla-bot cla-bot bot added the cla-signed label May 5, 2023
@codecov
Copy link

codecov bot commented May 5, 2023

Codecov Report

Patch coverage: 79.48% and project coverage change: -0.02 ⚠️

Comparison is base (6c9a8d3) 88.24% compared to head (5c9dc98) 88.23%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1554      +/-   ##
==========================================
- Coverage   88.24%   88.23%   -0.02%     
==========================================
  Files         226      226              
  Lines       21132    21168      +36     
==========================================
+ Hits        18648    18677      +29     
- Misses       1590     1598       +8     
+ Partials      894      893       -1     
Impacted Files Coverage Δ
pkg/context/opqueue/opqueue.go 80.75% <67.34%> (-0.85%) ⬇️
cmd/orb-server/startcmd/params.go 86.30% <100.00%> (+0.18%) ⬆️
cmd/orb-server/startcmd/start.go 67.52% <100.00%> (+0.03%) ⬆️
internal/pkg/log/fields.go 98.71% <100.00%> (+<0.01%) ⬆️
pkg/observer/pubsub.go 93.06% <100.00%> (ø)

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

@bstasyszyn bstasyszyn merged commit c4fd3f2 into trustbloc:main May 5, 2023
@bstasyszyn bstasyszyn deleted the 1547 branch May 5, 2023 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants