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

fix: Replace aioredlock with pg_advisory_lock #482

Merged
merged 10 commits into from
Oct 4, 2021

Conversation

achimnol
Copy link
Member

@achimnol achimnol commented Oct 3, 2021

No description provided.

@achimnol achimnol added this to the 21.03 milestone Oct 3, 2021
@codecov
Copy link

codecov bot commented Oct 3, 2021

Codecov Report

Merging #482 (9e0cd14) into main (aabb0c1) will increase coverage by 0.09%.
The diff coverage is 94.73%.

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

@@            Coverage Diff             @@
##             main     #482      +/-   ##
==========================================
+ Coverage   48.67%   48.77%   +0.09%     
==========================================
  Files          54       54              
  Lines        8879     8882       +3     
==========================================
+ Hits         4322     4332      +10     
+ Misses       4557     4550       -7     
Impacted Files Coverage Δ
src/ai/backend/manager/scheduler/dispatcher.py 18.23% <ø> (ø)
src/ai/backend/manager/distributed.py 92.85% <83.33%> (-4.29%) ⬇️
src/ai/backend/manager/defs.py 100.00% <100.00%> (ø)
src/ai/backend/manager/idle.py 31.20% <100.00%> (ø)
src/ai/backend/manager/models/utils.py 77.01% <100.00%> (+11.15%) ⬆️

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 aabb0c1...1259b3a. Read the comment docs.

fix: Update comment in dispatcher mentioning aioredlock
@achimnol achimnol changed the title fix: Replace aioredlock with pg_adivosry_lock fix: Replace aioredlock with pg_advisory_lock Oct 3, 2021
@achimnol achimnol merged commit d38942c into main Oct 4, 2021
@achimnol achimnol deleted the fix/replace-aioredlock-with-pgadvisorylock branch October 4, 2021 14:10
achimnol added a commit that referenced this pull request Oct 4, 2021
* setup: Remove aioredlock from our requirements
* test: Silence etcd3 deprecation warnings

Backported-From: main (21.09)
Backported-To: 21.03
achimnol added a commit that referenced this pull request Oct 5, 2021
* Use pg_try_advisory_lock() combined with client-side sleep
  - This will avoid being affected by arbitrary statement and lock timeout configs
    as well as TCP keepalive configs, with a small sacrifice on CPU cycles
    and network traffic at the database connection for each timer.
* refactor: Single-source the database creation routine
  as models.utils.connect_database()
achimnol added a commit that referenced this pull request Oct 5, 2021
* Use pg_try_advisory_lock() combined with client-side sleep
  - This will avoid being affected by arbitrary statement and lock timeout configs
    as well as TCP keepalive configs, with a small sacrifice on CPU cycles
    and network traffic at the database connection for each timer.
* refactor: Single-source the database creation routine
  as models.utils.connect_database()

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

Successfully merging this pull request may close these issues.

1 participant