Skip to content

Refactor BsRequest creation to reduce deadlock risk#19308

Open
rubhanazeem wants to merge 1 commit intoopenSUSE:masterfrom
rubhanazeem:rm-transation-req-create
Open

Refactor BsRequest creation to reduce deadlock risk#19308
rubhanazeem wants to merge 1 commit intoopenSUSE:masterfrom
rubhanazeem:rm-transation-req-create

Conversation

@rubhanazeem
Copy link
Copy Markdown
Member

@rubhanazeem rubhanazeem commented Feb 18, 2026

This pr removes the outer transaction block to release write locks as soon as possible and moved the validation outside the transaction. This reduces database lock time hence reduces the possibility of Deadlock errors in request creation.

There are some Mysql2::Error: Deadlock exceptions noted down in Errbit because of this

@github-actions github-actions bot added the Frontend Things related to the OBS RoR app label Feb 18, 2026
@rubhanazeem rubhanazeem marked this pull request as ready for review February 18, 2026 17:09
Remove the outer transaction block to release write locks as soon as possible
and moved the validation outside the transaction. This reduces database
lock time hence reduces the possibility of Deadlock errors
@rubhanazeem rubhanazeem force-pushed the rm-transation-req-create branch from a368da9 to 42fb981 Compare April 2, 2026 10:50
@req.set_add_revision if params[:addrevision].present?
@req.set_ignore_delegate if params[:ignore_delegate].present?
@req.set_ignore_build_state if params[:ignore_build_state].present?
@req.save!
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hm, and what replaces the transaction functionality?

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

Labels

Frontend Things related to the OBS RoR app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants