quantified-uncertainty / squiggle

An estimation language
https://squiggle-language.com
MIT License
156 stars 23 forks source link

Optimize workflow DB updates #3453

Open berekuk opened 4 days ago

berekuk commented 4 days ago

This is done on top of #3450 and #3452; I recommend reviewing and merging those first.

In this PR, only the last commit matters, 8306c4e1246918c446f15add060282185f58d3bb

I'm not sure if this is going to help, but it's a result of my investigation of performance and the discussion with Claude: trying to avoid upserts, doing separate create and updates.

Btw, I hope that creates and updates happen in order; if they don't, somehow, because the DB locks and a few updates are queued up, and then those are executed in a random order, then we might end up with an older final version of the workflow. If this is the cause of disappearing workflows issue, then at least I added some logging here.

changeset-bot[bot] commented 4 days ago

⚠️ No Changeset found

Latest commit: 8306c4e1246918c446f15add060282185f58d3bb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

vercel[bot] commented 4 days ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
quri-hub ✅ Ready (Inspect) Visit Preview Nov 25, 2024 1:54am
quri-ui ✅ Ready (Inspect) Visit Preview Nov 25, 2024 1:54am
squiggle-components ✅ Ready (Inspect) Visit Preview Nov 25, 2024 1:54am
squiggle-website ✅ Ready (Inspect) Visit Preview Nov 25, 2024 1:54am