-
Notifications
You must be signed in to change notification settings - Fork 18
Dyanmic Queue Support #391
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
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
2d7953c
added initial queues DAO methods
devhawk c4c5348
updateQueue
devhawk 24e044c
dynamic queues conductor protocol
devhawk be06865
WIP
devhawk 6cd677f
spotless
devhawk 3e118ba
wip
devhawk 1bf58d0
QueueConflictResolution
devhawk 846445f
fix tests
devhawk c31c452
use queue polling interval
devhawk 755a9d9
inline pollWorkflowSchedulesImpl
devhawk ed188a5
pollDynamicQueues + tests
devhawk 5021923
spotless
devhawk 1c4d927
cleanup
devhawk fe9658f
spotless
devhawk 74d5f2a
moar cleanup
devhawk f3de1a0
add more tests + fix truncateDbosTables
devhawk 3a55834
fix queues int columns for CRDB
devhawk 529fa46
Merge branch 'main' into devhawk/dynamic-queues
devhawk dedd622
copilot feedback
devhawk b27edd6
Merge branch 'main' into devhawk/dynamic-queues
devhawk 0ed1106
Merge branch 'main' into devhawk/dynamic-queues
devhawk 3330cd7
Merge branch 'main' into devhawk/dynamic-queues
devhawk 0e51c0b
more tests
devhawk e1cc7dc
in memory cache of dynamic queues for validation
devhawk 73340cd
add tests that dynamic queue updates are seen by queue service
devhawk d4819de
fix flaky test
devhawk 1a611f2
Merge branch 'main' into devhawk/dynamic-queues
devhawk a4ac8a1
merge all dynamic queue tests into a single class
devhawk 05e925b
Merge branch 'main' into devhawk/dynamic-queues
devhawk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
10 changes: 10 additions & 0 deletions
10
transact/src/main/java/dev/dbos/transact/conductor/protocol/GetQueueRequest.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| package dev.dbos.transact.conductor.protocol; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
|
|
||
| @JsonIgnoreProperties(ignoreUnknown = true) | ||
| public class GetQueueRequest extends BaseMessage { | ||
| public String name; | ||
|
|
||
| public GetQueueRequest() {} | ||
| } |
17 changes: 17 additions & 0 deletions
17
transact/src/main/java/dev/dbos/transact/conductor/protocol/GetQueueResponse.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| package dev.dbos.transact.conductor.protocol; | ||
|
|
||
| public class GetQueueResponse extends BaseResponse { | ||
| public QueueOutput output; | ||
|
|
||
| public GetQueueResponse() {} | ||
|
|
||
| public GetQueueResponse(BaseMessage message, QueueOutput output) { | ||
| super(message.type, message.request_id); | ||
| this.output = output; | ||
| } | ||
|
|
||
| public GetQueueResponse(BaseMessage message, String errorMessage) { | ||
| super(message.type, message.request_id, errorMessage); | ||
| this.output = null; | ||
| } | ||
| } |
8 changes: 8 additions & 0 deletions
8
transact/src/main/java/dev/dbos/transact/conductor/protocol/ListQueuesRequest.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| package dev.dbos.transact.conductor.protocol; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
|
|
||
| @JsonIgnoreProperties(ignoreUnknown = true) | ||
| public class ListQueuesRequest extends BaseMessage { | ||
| public ListQueuesRequest() {} | ||
| } |
20 changes: 20 additions & 0 deletions
20
transact/src/main/java/dev/dbos/transact/conductor/protocol/ListQueuesResponse.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| package dev.dbos.transact.conductor.protocol; | ||
|
|
||
| import java.util.Collections; | ||
| import java.util.List; | ||
|
|
||
| public class ListQueuesResponse extends BaseResponse { | ||
| public List<QueueOutput> output; | ||
|
|
||
| public ListQueuesResponse() {} | ||
|
|
||
| public ListQueuesResponse(BaseMessage message, List<QueueOutput> output) { | ||
| super(message.type, message.request_id); | ||
| this.output = output; | ||
| } | ||
|
|
||
| public ListQueuesResponse(BaseMessage message, String errorMessage) { | ||
| super(message.type, message.request_id, errorMessage); | ||
| this.output = Collections.emptyList(); | ||
| } | ||
| } |
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
27 changes: 27 additions & 0 deletions
27
transact/src/main/java/dev/dbos/transact/conductor/protocol/QueueOutput.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| package dev.dbos.transact.conductor.protocol; | ||
|
|
||
| import dev.dbos.transact.workflow.Queue; | ||
|
|
||
| public record QueueOutput( | ||
| String name, | ||
| Integer concurrency, | ||
| Integer worker_concurrency, | ||
| Integer rate_limit_max, | ||
| Double rate_limit_period_sec, | ||
| boolean priority_enabled, | ||
| boolean partition_queue, | ||
| double polling_interval_sec) { | ||
|
|
||
| public static QueueOutput from(Queue q) { | ||
| Queue.RateLimit rl = q.rateLimit(); | ||
| return new QueueOutput( | ||
| q.name(), | ||
| q.concurrency(), | ||
| q.workerConcurrency(), | ||
| rl != null ? rl.limit() : null, | ||
| rl != null ? rl.period().toMillis() / 1000.0 : null, | ||
| q.priorityEnabled(), | ||
| q.partitioningEnabled(), | ||
| q.pollingInterval().toMillis() / 1000.0); | ||
| } | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.