-
Notifications
You must be signed in to change notification settings - Fork 287
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
engine: unit status use cached source status #7618
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/run-all-tests |
|
||
if sourceStatus == nil || time.Since(sourceStatus.UpdateTime) > sourceStatusRefreshInterval { | ||
u.Status(ctx) | ||
u.updateSourceStatus(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still need to call u.unit.Status here, because the metrics related variables are updated in u.unit.Status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which variables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for example
s.metricsProxies.Metrics.RemainingTimeGauge.Set(float64(remainingSeconds))
this line is contained in (*Syncer).printStatus <- (*Syncer).Status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed here c55d42d
bad idea to have a status getter to have such side effects.
…into use-cached-sourceStatus
Codecov Report
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. @@ Coverage Diff @@
## master #7618 +/- ##
================================================
- Coverage 60.0458% 59.9745% -0.0714%
================================================
Files 807 808 +1
Lines 92391 92656 +265
================================================
+ Hits 55477 55570 +93
- Misses 32099 32259 +160
- Partials 4815 4827 +12 |
/run-all-tests |
/run-engine-integration-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 2199c21
|
@D3Hunter: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/run-engine-integration-test |
2 similar comments
/run-engine-integration-test |
/run-engine-integration-test |
What problem does this PR solve?
Issue Number: ref #7343
What is changed and how it works?
get job api
which callsdm status
, but current impl will get source status every time, if the source is down, it won't return after 30s timeout, which will make df-serviceget/list job
timeout and fails. so changeunit.Status
to use cached source status.Check List
Tests
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note