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

Lock the trial heartbeat model #5447

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HideakiImamura
Copy link
Member

Motivation

When using RDB in Optuna, the thread that records Heartbeat for Trial runs in parallel with the threads running Study and Trial. When writing values to Study and Trial tables, we are calling with_for_update so that the FOR UPDATE clause is appended to the SELECT sentences, but not when writing values to Heartbeat tables. This may cause an unexpected lock when writing values to Heartbeat tables, resulting in a deadlock. This PR suggests calling with_for_update when writing to Heartbeat tables.

Description of the changes

  • Add with_for_update to the Heartbeat table.

@eukaryo eukaryo self-assigned this May 15, 2024
Copy link
Contributor

This pull request has not seen any recent activity.

@github-actions github-actions bot added the stale Exempt from stale bot labeling. label May 22, 2024
@nabenabe0928 nabenabe0928 removed the stale Exempt from stale bot labeling. label May 22, 2024
@eukaryo eukaryo mentioned this pull request May 29, 2024
Copy link
Contributor

This pull request has not seen any recent activity.

@github-actions github-actions bot added the stale Exempt from stale bot labeling. label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Exempt from stale bot labeling.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants