Stop createTables from hanging on table locks - #369
Merged
Merged
Conversation
Jobs got stuck at 0% CPU right after fetching the reference files. On the shared PostgreSQL database every run kept the transaction of its first SELECT open until the results were written, holding a share lock on libversion, omcversion and the branch table for hours. The next run's createTables issued `ALTER TABLE ... ADD COLUMN IF NOT EXISTS` and `CREATE INDEX IF NOT EXISTS`, which take their table lock before checking whether there is anything to do, so it waited for those runs to finish - and every later reader of the table queued behind it. - createTables only alters or indexes what is actually missing, and sets a lock_timeout so a needed lock fails the run instead of hanging it. - test.py commits after choosing the libraries and after querying the expected execution times, so a run no longer locks the tables while testing. - Run test.py with PYTHONUNBUFFERED: stdbuf does not affect Python, so its output lagged behind git's and a hang looked like it was in git. Also print each library before loading it. - NeuralNetwork and URDFModelica reference files live on `main`; the reset to the default `origin/master` failed and left them stale. Assisted-by: Claude Opus 5.5
sjoelund
enabled auto-merge (squash)
October 6, 2026 13:05
sjoelund
disabled auto-merge
October 6, 2026 13:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jobs got stuck at 0% CPU right after fetching the reference files. On the shared PostgreSQL database every run kept the transaction of its first SELECT open until the results were written, holding a share lock on libversion, omcversion and the branch table for hours. The next run's createTables issued
ALTER TABLE ... ADD COLUMN IF NOT EXISTSandCREATE INDEX IF NOT EXISTS, which take their table lock before checking whether there is anything to do, so it waited for those runs to finish - and every later reader of the table queued behind it.main; the reset to the defaultorigin/masterfailed and left them stale.Assisted-by: Claude Opus 5.5