mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 16:11:57 +00:00
Under high contention, the updating of execution logs query: ``` UPDATE lsif_indexes SET execution_logs = execution_logs || $1::json WHERE id = $2 AND worker_hostname = $3 AND state = $4 RETURNING ARRAY_LENGTH(execution_logs, $5) ``` Was taking multiple seconds due to lock contention on the lsif_indexes_state index.  Running `EXPLAIN ANALYZE` on Sourcegraph.com under lower contention uses the primary key index on id, so we don't have an easy way to test the high contention scenario. Try this alternate query form to see if that fixes the issue. |
||
|---|---|---|
| .. | ||
| dbworker | ||
| BUILD.bazel | ||
| CODENOTIFY | ||
| handler.go | ||
| idset_test.go | ||
| idset.go | ||
| main_test.go | ||
| mocks_test.go | ||
| observability.go | ||
| store.go | ||
| worker_test.go | ||
| worker.go | ||