You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
fix: Try workaround for bad index choice when updating execution logs (#64328)
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.
0 commit comments