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

[IMP] queue_job: HA job runner using session level advisory lock #668

Open
wants to merge 4 commits into
base: 16.0
Choose a base branch
from

Conversation

sbidoul
Copy link
Member

@sbidoul sbidoul commented Jul 2, 2024

Another attempt.

@OCA-git-bot
Copy link
Contributor

Hi @guewen,
some modules you are maintaining are being modified, check this out!

Without this, we leak connections to Databases that don't have queue_job
installed.
Without this we risk connection leaks in case of exceptions in the
constructor.
@sbidoul
Copy link
Member Author

sbidoul commented Jul 2, 2024

Yep, this should work.

Copy link
Member

@guewen guewen left a comment

Choose a reason for hiding this comment

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

Yes!

@sbidoul
Copy link
Member Author

sbidoul commented Jul 4, 2024

@PCatinean do you know who we should ping in the odoo.sh team to have an opinion on this approach?

@PCatinean
Copy link
Contributor

Hi @sbidoul the only two people I know around this topic are @amigrave which gave the initial feedback on the advisory lock MR here #256 and @sts-odoo which also provided some feedback on the pg_application_name approach

@sbidoul
Copy link
Member Author

sbidoul commented Jul 4, 2024

@amigrave @sts-odoo so the TL;DR here is that we have one long lived connection to the database on which we take a session-level advisory lock and do a LISTEN. There is no long-lived transaction, so this should not impact replication.

I plan to deploy this on a odoo.sh dev env soon to see how it goes. I can PM you the details if you wish to monitor something.

Copy link

github-actions bot commented Nov 3, 2024

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 3, 2024
@sbidoul sbidoul removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants