Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize workflow DB updates #3453

Merged
merged 19 commits into from
Dec 3, 2024
Merged

Optimize workflow DB updates #3453

merged 19 commits into from
Dec 3, 2024

Conversation

berekuk
Copy link
Collaborator

@berekuk berekuk commented Nov 25, 2024

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

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

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.

@berekuk berekuk requested a review from OAGr as a code owner November 25, 2024 01:51
Copy link

changeset-bot bot commented Nov 25, 2024

⚠️ No Changeset found

Latest commit: 8306c4e

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

Copy link

vercel bot commented Nov 25, 2024

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

Copy link
Contributor

@OAGr OAGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me. The main patch you flagged as the important one is pretty small.

@berekuk berekuk merged commit 0007c55 into main Dec 3, 2024
6 checks passed
@berekuk berekuk deleted the optimize-workflows branch December 3, 2024 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants