Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

fix: Rollback polling of advisory lock in #483 #503

Merged
merged 4 commits into from
Dec 14, 2021

Conversation

achimnol
Copy link
Member

@achimnol achimnol commented Dec 9, 2021

This PR reverts the busy-polling of advisory locks but preserves the
refactoring of #483 such as introduction of connect_database() utility
function.

In our customer sites, the good-old blocking advisory lock (#482) is proven to
work better, particularly with limited number of maximum database
connections.

Ultimately we should migrate distributed locking to etcd, but it requires
rewriting of the etcd3 client library and thus will be revisited in the
future.

* But preserve other refactoring parts of #483.
@achimnol achimnol added this to the 21.03 milestone Dec 9, 2021
@achimnol achimnol self-assigned this Dec 9, 2021
@codecov
Copy link

codecov bot commented Dec 9, 2021

Codecov Report

Merging #503 (bd4441c) into main (3956b1f) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head bd4441c differs from pull request most recent head a9826b2. Consider uploading reports for the commit a9826b2 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #503      +/-   ##
==========================================
- Coverage   48.84%   48.84%   -0.01%     
==========================================
  Files          54       54              
  Lines        8946     8943       -3     
==========================================
- Hits         4370     4368       -2     
+ Misses       4576     4575       -1     
Impacted Files Coverage Δ
src/ai/backend/manager/models/utils.py 76.52% <100.00%> (+0.25%) ⬆️

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 3956b1f...a9826b2. Read the comment docs.

@achimnol achimnol requested a review from adrysn December 9, 2021 15:06
@achimnol achimnol merged commit d8d525a into main Dec 14, 2021
@achimnol achimnol deleted the fix/rollback-polling-for-advisory-lock branch December 14, 2021 16:57
achimnol added a commit that referenced this pull request Dec 14, 2021
* But preserve other refactoring parts of #483.

Backported-From: main (22.03)
Backported-To: 21.09
achimnol added a commit that referenced this pull request Dec 14, 2021
* But preserve other refactoring parts of #483.

Backported-From: main (22.03)
Backported-To: 21.03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant