Closed alexeykazakov closed 5 years ago
Merging #833 into master will decrease coverage by
0.23%
. The diff coverage is59.09%
.
@@ Coverage Diff @@
## master #833 +/- ##
========================================
- Coverage 78.24% 78% -0.24%
========================================
Files 98 98
Lines 9206 9254 +48
========================================
+ Hits 7203 7219 +16
- Misses 1470 1497 +27
- Partials 533 538 +5
Impacted Files | Coverage Δ | |
---|---|---|
...n/subscription/service/oso_subscription_service.go | 79.13% <100%> (ø) |
:arrow_up: |
...ication/account/worker/user_deactivation_worker.go | 46.34% <100%> (ø) |
:arrow_up: |
...nt/worker/user_deactivation_notification_worker.go | 82.6% <100%> (ø) |
:arrow_up: |
worker/worker.go | 60.49% <26.31%> (-21.05%) |
:arrow_down: |
worker/repository/worker_lock_repository.go | 71.92% <68.29%> (-20.08%) |
:arrow_down: |
log/log.go | 74.1% <0%> (+1.43%) |
:arrow_up: |
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 8469a52...13c2b67. Read the comment docs.
This PR fixes a few issues with the locking mechanism:
pglock.FailIfLocked()
option inc.Acquire(name, pglock.FailIfLocked())
when trying to acquire a lock. If this option is used then pglock won't check if the lease has been expired. So even if hearbeat failed (because the owner is gone) this option will always return an error which will prevent to acquire the lock by another owner.