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

Pass task queue types to Describe and take unecessary info out of TaskQueueFamilyData #7234

Open
wants to merge 3 commits into
base: versioning-3.1
Choose a base branch
from

Conversation

carlydf
Copy link
Contributor

@carlydf carlydf commented Feb 4, 2025

What changed?

  1. Pass Task Queue Types to CheckIfTaskQueuesHavePollers activity so that we check pollers for only the task queue types that are registered in that version.
  2. Remove DeploymentVersionData from the per-type map in TaskQueueFamilyData. DeploymentVersionData stores the same info as VersionLocalState, so repeating it num_task_queue times inside the VersionLocalState was a waste of space, and kind of confusing. I spoke with Shahab yesterday about how TaskQueueFamilyData should contain information that is specific to each task queue type within that version. So far, the only data that is specific to the version + task queue tuple is first_poller_time, so I put that in a new TaskQueueVersionData struct and put it in TaskQueueFamilyData.

Why?

See explanation above.

How did you test it?

Tested that the existing Versioning 3.1 functional tests still work.

Potential risks

Documentation

Is hotfix candidate?

@carlydf carlydf requested a review from a team as a code owner February 4, 2025 06:22
@carlydf carlydf changed the title take unecessary info out of TaskQueueFamilyData and pass task queue type to Describe Pass task queue types to Describe and take unecessary info out of TaskQueueFamilyData Feb 4, 2025
Copy link
Member

@Shivs11 Shivs11 left a comment

Choose a reason for hiding this comment

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

approved, but with a comment or two

Comment on lines 276 to 285
for tqName, byType := range state.TaskQueueFamilies {
for tqType, oldData := range byType.TaskQueues {

syncReq.Sync = append(syncReq.Sync, &deploymentspb.SyncDeploymentVersionUserDataRequest_SyncUserData{
Name: tqName,
Type: enumspb.TaskQueueType(tqType),
Data: oldData,
})
}
}
Copy link
Member

Choose a reason for hiding this comment

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

I seem to be missing something here - why are we removing this piece of code? According to me, when forgetting a version, we still have to specify the task-queues and the types from where the version would be forgotten from - this piece of code seems to be doing that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I got confused, just meant to remove the data part. Fixing

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.

2 participants