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

scheduler: count implicit spread targets as a single target #17195

Merged
merged 1 commit into from
May 17, 2023

Conversation

tgross
Copy link
Member

@tgross tgross commented May 15, 2023

When calculating the score in the SpreadIterator, the score boost is proportional to the difference between the current and desired count. But when there are implicit spread targets, the current count is the sum of the possible implicit targets, which results in incorrect scoring unless there's only one implicit target.

This changeset updates the propertySet struct to accept a set of explicit target values so it can detect when a property value falls into the implicit set and should be combined with other implicit values.

Fixes: #11823

@tgross tgross force-pushed the b-spread-with-implicit-target branch from 3165b83 to b71d607 Compare May 15, 2023 17:53
@tgross tgross added this to the 1.6.0 milestone May 15, 2023
@tgross tgross force-pushed the b-spread-with-implicit-target branch 2 times, most recently from 970e2c9 to 9cd0490 Compare May 15, 2023 18:05
@tgross tgross marked this pull request as ready for review May 15, 2023 18:29
@tgross tgross requested review from shoenig and schmichael May 15, 2023 18:29
@tgross tgross added the hcc/cst Admin - internal label May 15, 2023
@tgross tgross modified the milestones: 1.6.0, 1.5.x May 15, 2023
Copy link
Member

@shoenig shoenig left a comment

Choose a reason for hiding this comment

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

LGTM!

scheduler/propertyset.go Outdated Show resolved Hide resolved
When calculating the score in the `SpreadIterator`, the score boost is
proportional to the difference between the current and desired count. But when
there are implicit spread targets, the current count is the sum of the possible
implicit targets, which results in incorrect scoring unless there's only one
implicit target.

This changeset updates the `propertySet` struct to accept a set of explicit
target values so it can detect when a property value falls into the implicit set
and should be combined with other implicit values.

Fixes: #11823
@tgross tgross force-pushed the b-spread-with-implicit-target branch from 057cd78 to aeeb3f9 Compare May 16, 2023 20:30
@tgross tgross merged commit feb34c7 into main May 17, 2023
12 checks passed
@tgross tgross deleted the b-spread-with-implicit-target branch May 17, 2023 14:25
tgross added a commit that referenced this pull request May 17, 2023
When calculating the score in the `SpreadIterator`, the score boost is
proportional to the difference between the current and desired count. But when
there are implicit spread targets, the current count is the sum of the possible
implicit targets, which results in incorrect scoring unless there's only one
implicit target.

This changeset updates the `propertySet` struct to accept a set of explicit
target values so it can detect when a property value falls into the implicit set
and should be combined with other implicit values.

Fixes: #11823
tgross added a commit that referenced this pull request May 17, 2023
When calculating the score in the `SpreadIterator`, the score boost is
proportional to the difference between the current and desired count. But when
there are implicit spread targets, the current count is the sum of the possible
implicit targets, which results in incorrect scoring unless there's only one
implicit target.

This changeset updates the `propertySet` struct to accept a set of explicit
target values so it can detect when a property value falls into the implicit set
and should be combined with other implicit values.

Fixes: #11823
tgross added a commit that referenced this pull request May 17, 2023
When calculating the score in the `SpreadIterator`, the score boost is
proportional to the difference between the current and desired count. But when
there are implicit spread targets, the current count is the sum of the possible
implicit targets, which results in incorrect scoring unless there's only one
implicit target.

This changeset updates the `propertySet` struct to accept a set of explicit
target values so it can detect when a property value falls into the implicit set
and should be combined with other implicit values.

Fixes: #11823
tgross added a commit that referenced this pull request May 17, 2023
When calculating the score in the `SpreadIterator`, the score boost is
proportional to the difference between the current and desired count. But when
there are implicit spread targets, the current count is the sum of the possible
implicit targets, which results in incorrect scoring unless there's only one
implicit target.

This changeset updates the `propertySet` struct to accept a set of explicit
target values so it can detect when a property value falls into the implicit set
and should be combined with other implicit values.

Fixes: #11823
tgross added a commit that referenced this pull request May 17, 2023
When calculating the score in the `SpreadIterator`, the score boost is
proportional to the difference between the current and desired count. But when
there are implicit spread targets, the current count is the sum of the possible
implicit targets, which results in incorrect scoring unless there's only one
implicit target.

This changeset updates the `propertySet` struct to accept a set of explicit
target values so it can detect when a property value falls into the implicit set
and should be combined with other implicit values.

Fixes: #11823
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

implicit spread target results in incorrect scoring
2 participants