-
Notifications
You must be signed in to change notification settings - Fork 41
Q dedup and prio #55
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
Q dedup and prio #55
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds deduplication and priority features to workflow queues. The implementation introduces a mechanism to prevent duplicate workflows from being enqueued based on a deduplication ID and allows workflows to be prioritized for execution order.
- Adds
WithDeduplicationIDandWithPriorityworkflow options for configuring queue behavior - Implements deduplication logic that throws
QueueDeduplicatederror when duplicate workflows are detected - Extends queue system to support priority-based execution ordering
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| dbos/workflow.go | Adds deduplication and priority parameters to workflow options and enqueue functionality |
| dbos/system_database.go | Implements deduplication constraint handling with proper error detection |
| dbos/errors.go | Defines new QueueDeduplicated error type for deduplication violations |
| dbos/queues_test.go | Comprehensive test coverage for deduplication and priority queue features |
| dbos/client_test.go | Client-side tests for deduplication and priority functionality |
| dbos/workflows_test.go | Minor test improvements and timeout adjustments |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
kraftp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! Only thing I'd check is that it should be easy to check if an error is the deduplicated error so it can be handled specially.
Here's how you'd do the check (https://github.com/dbos-inc/dbos-transact-go/pull/55/files#diff-305ba99507d11e31f033fa05624d0ed3fc5bcda80bfa2e1fc70603c974cdfcdbR306) |
No description provided.