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

xds: handle errors in xds_client #3658

Merged
merged 3 commits into from
Jun 3, 2020

Conversation

menghanl
Copy link
Contributor

@menghanl menghanl commented Jun 2, 2020

  • xds_client

    • send resource-not-found error when a resource is removed for LDS or CDS
    • handle LDS resource-not-found to cancel RDS watch
  • test update because it was expecting no update when resource is removed

  • test cleanup to apply timeout to channels

@menghanl menghanl requested a review from easwars June 2, 2020 20:20
@menghanl menghanl added the Type: Feature New features or improvements in behavior label Jun 2, 2020
@menghanl menghanl added this to the 1.30 Release milestone Jun 2, 2020
@menghanl menghanl assigned menghanl and unassigned easwars Jun 2, 2020
Copy link
Contributor

@easwars easwars left a comment

Choose a reason for hiding this comment

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

Haven't looked at the tests yet.

}
}
// When LDS resource is removed, we don't delete corresponding RDS cached
// data. The RDS watch will be canceled, and cache is removed when the last
Copy link
Contributor

Choose a reason for hiding this comment

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

s/cache/cache entry/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


// TODO: remove item from cache and remove corresponding RDS cached data.
for name := range c.ldsCache {
if _, ok := d[name]; !ok {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have a better variable name for d whose scope has now gotten bigger.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed to updates

}
}
// When CDS resource is removed, we don't delete corresponding EDS cached
// data. The EDS watch will be canceled, and cache is removed when the last
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto here.
s/cache/cache entry/
And better name for d.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor Author

@menghanl menghanl left a comment

Choose a reason for hiding this comment

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

Thanks for the review!


// TODO: remove item from cache and remove corresponding RDS cached data.
for name := range c.ldsCache {
if _, ok := d[name]; !ok {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed to updates

}
}
// When LDS resource is removed, we don't delete corresponding RDS cached
// data. The RDS watch will be canceled, and cache is removed when the last
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

}
}
// When CDS resource is removed, we don't delete corresponding EDS cached
// data. The EDS watch will be canceled, and cache is removed when the last
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@menghanl menghanl assigned easwars and unassigned menghanl Jun 3, 2020
@menghanl menghanl merged commit 42eed59 into grpc:master Jun 3, 2020
@menghanl menghanl deleted the xds_client_error_handling branch June 3, 2020 16:57
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Feature New features or improvements in behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants