Skip to content
Snippets Groups Projects

codeintel: Minimize the number of duplicate rows inserted in UpdateCommits

Merged Warren Gifford requested to merge minimize-lsif-commits-insertion into master

Created by: efritz

The new services are causing a periodic deadlock between the api-server and the worker trying to insert records into the lsif_commits table. The worker does this inside of a long transaction, and the api-server does this as a means to discover what dumps it can use to serve the current query.

One way to mitigate this is to shorten the transaction in the worker. This will also be done, but in a separate effort. Another way is to reduce the number of clashing rows that are inserted into a unique index (see this article). That is this PR's focus.

For context, see https://sourcegraph.slack.com/archives/C07KZF47K/p1589231888204200.

Merge request reports

Merged by avatar (Jul 13, 2025 3:32am UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading