Skip to content

[FIX][18.0] queue_job: indicate that run_job need a read/write connection - #742

Merged
OCA-git-bot merged 1 commit into
OCA:18.0from
xcgd:feature/18.0/queue_job/fix-readonly-route
Jan 24, 2025
Merged

[FIX][18.0] queue_job: indicate that run_job need a read/write connection#742
OCA-git-bot merged 1 commit into
OCA:18.0from
xcgd:feature/18.0/queue_job/fix-readonly-route

Conversation

@vincent-hatakeyama

Copy link
Copy Markdown
Contributor

Without this fix, if db_replica_host is set, Odoo might pass a readonly database cursor and the FOR UPDATE in the method would fail.

Without this fix, if db_replica_host is set, Odoo might pass a readonly
database cursor and the FOR UPDATE in the method would fail.
@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

@simahawk

Copy link
Copy Markdown
Contributor

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 18.0-ocabot-merge-pr-742-by-simahawk-bump-patch, awaiting test results.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 0767459. Thanks a lot for contributing to OCA. ❤️

@vincent-hatakeyama
vincent-hatakeyama deleted the feature/18.0/queue_job/fix-readonly-route branch January 24, 2025 15:58
@aallouche

Copy link
Copy Markdown

Thanks for the quick merge! Much appreciated.

@StefanRijnhart

Copy link
Copy Markdown
Member

@vincent-hatakeyama Can I ask you, I'm curious why this is necessary. https://github.com/odoo/odoo/blob/b2d709b/odoo/http.py#L701-L703 seems to imply that the cursor will default to read/write. Where is the default determined as True?

@StefanRijnhart

Copy link
Copy Markdown
Member

@vincent-hatakeyama Oh, never mind. Found it in https://github.com/odoo/odoo/blob/b2d709b/odoo/http.py#L863, when auth='none'.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@vincent-hatakeyama@OCA-git-bot@simahawk@aallouche@StefanRijnhart@guewen@sbidoul