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

Remove state machine task type from the outbound queue key type #5895

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rodrigozhou
Copy link
Contributor

What changed?

Remove state machine task type from the outbound queue key type

Why?

State machine task type is not being used, and dynamic configs don't have task type, so caching with state machine task type will result is unexpected results.

How did you test it?

Added unit tests for the grouper.

Potential risks

Documentation

Is hotfix candidate?

@rodrigozhou rodrigozhou requested a review from bergundy May 9, 2024 18:15
@rodrigozhou rodrigozhou requested a review from a team as a code owner May 9, 2024 18:15
@rodrigozhou rodrigozhou requested a review from pdoerner May 9, 2024 20:17
key.NamespaceID,
key.Destination,
),
},
)
},
)
grouper := queues.GrouperStateMachineNamespaceIDAndDestination{}
grouper := queues.GrouperNamespaceIDAndDestination{}
Copy link
Member

Choose a reason for hiding this comment

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

I'm debating whether we also want to group tasks by this predicate.

Right now there are 3 task types on this queue:

  1. callbacks
  2. nexus start operation
  3. nexus cancel operation

We want 2 and 3 to be grouped together and 1 to never be grouped with them.
Today coincidentally your change achieves want we want works because the destinations for callbacks and nexus operations are not going to overlap.

When we add a fourth task type, we'll want the able to control the grouping.

So I think we actually want to instead of removing the task type dimension, replace it with something that gives us extra control. That'll be a bit more difficult to set up because you'll want the grouping to be set where the task is defined, e.g. add it here

type TaskKindOutbound struct {
and
type StateMachineOutboundTask struct {
.

If you want to put in the effort for that, go ahead but otherwise leave the code that's in main.

@rodrigozhou rodrigozhou marked this pull request as draft May 10, 2024 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants