Skip to content

fix: ReserveTaskBatchRun does not need to lock v1_task_runtime - #4516

Merged
juliusgeo merged 1 commit into
mainfrom
fix_batch_deadlock
Jul 24, 2026
Merged

fix: ReserveTaskBatchRun does not need to lock v1_task_runtime#4516
juliusgeo merged 1 commit into
mainfrom
fix_batch_deadlock

Conversation

@juliusgeo

@juliusgeo juliusgeo commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Description

This can sometimes deadlock with other queries that also write to v1_task_runtime. However,
we don't need a write-lock on v1_task_runtime, so rather than use ORDER BY, use UPDATE OF.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation change (pure documentation change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking changes to code which doesn't change any behaviour)
  • CI (any automation pipeline changes)
  • Chore (changes which are not directly related to any business logic)
  • Test changes (add, refactor, improve or change a test)
  • This change requires a documentation update

What's Changed

  • Add a list of tasks or features here...

Checklist

Changes have been:

  • Tested (unit, integration, or manually with steps specified)
  • Linted and formatted
  • Documented (where applicable)
  • Added to CHANGELOG (where applicable) -- see Keep a Changelog

🤖 AI Disclosure
  • I acknowledge that an LLM was used in the creation of this Pull Request, in accordance with Hatchet's AI_POLICY.md.
  • Details: [e.g. generating tests, writing docs]

@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hatchet-docs Ready Ready Preview, Comment Jul 24, 2026 3:27pm

Request Review

@github-actions github-actions Bot added the engine Related to the core Hatchet engine label Jul 24, 2026
@juliusgeo
juliusgeo merged commit 3334df5 into main Jul 24, 2026
61 checks passed
@juliusgeo
juliusgeo deleted the fix_batch_deadlock branch July 24, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine Related to the core Hatchet engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants