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

Reduce subscription lock usage to unsubscribe workflow only #17483

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

emlowe
Copy link
Contributor

@emlowe emlowe commented Feb 2, 2024

I think we can remove most of these subscription locks and rely on the DB context reader/writer locks instead. We don't cache this information, so I don't think we need any of these for data consistency on subscriptions

The one place where we maintain the lock is during unsubscribe where it protects access to the unsubscribe_data_queue

@emlowe emlowe requested review from altendky and fchirica February 2, 2024 17:14
@emlowe emlowe changed the title Reduce lock usage Reduce subscription lock usage to unsubscribe workflow only Feb 2, 2024
@emlowe emlowe added the Changed Required label for PR that categorizes merge commit message as "Changed" for changelog label Feb 2, 2024
Copy link
Contributor

@altendky altendky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it is protecting DataLayer.unsubscribe_data_queue which we append to in some places and iterate in others. At least. That could be addressed in other ways potentially.

@altendky
Copy link
Contributor

altendky commented Feb 7, 2024

Oh, I thought this was the PR where you wanted to remove a lock entirely. Nevermind, dismissing my review as I need to look more.

@altendky altendky dismissed their stale review February 7, 2024 15:53

too quick

@altendky altendky self-requested a review February 7, 2024 15:53
Copy link
Contributor

This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties.

@github-actions github-actions bot added the stale-pr Flagged as stale and in need of manual review label Mar 24, 2024
@emlowe
Copy link
Contributor Author

emlowe commented Mar 26, 2024

close and reopen

@emlowe emlowe closed this Mar 26, 2024
@emlowe emlowe reopened this Mar 26, 2024
@github-actions github-actions bot removed the stale-pr Flagged as stale and in need of manual review label Mar 27, 2024
@github-actions github-actions bot added the merge_conflict Branch has conflicts that prevent merge to main label May 10, 2024
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

1 similar comment
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Contributor

This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties.

@github-actions github-actions bot added the stale-pr Flagged as stale and in need of manual review label Jun 25, 2024
@github-actions github-actions bot removed the merge_conflict Branch has conflicts that prevent merge to main label Jul 24, 2024
Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

Copy link
Contributor

File Coverage Missing Lines
chia/data_layer/data_layer.py 76.9% lines 763, 849, 851
Total Missing Coverage
13 lines 3 lines 76%

@github-actions github-actions bot added coverage-diff and removed stale-pr Flagged as stale and in need of manual review labels Jul 24, 2024
Copy link
Contributor

github-actions bot commented Aug 9, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the merge_conflict Branch has conflicts that prevent merge to main label Aug 9, 2024
Copy link
Contributor

This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties.

@github-actions github-actions bot added the stale-pr Flagged as stale and in need of manual review label Sep 23, 2024
@github-actions github-actions bot removed the merge_conflict Branch has conflicts that prevent merge to main label Dec 10, 2024
Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@emlowe emlowe removed the stale-pr Flagged as stale and in need of manual review label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changed Required label for PR that categorizes merge commit message as "Changed" for changelog coverage-diff DataLayer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants