-
Notifications
You must be signed in to change notification settings - Fork 289
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
schema_storage: verbose DDL log #3187
Conversation
Signed-off-by: Neil Shen <[email protected]>
[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. |
@@ -719,11 +723,14 @@ func (s *schemaStorageImpl) GetSnapshot(ctx context.Context, ts uint64) (*schema | |||
// The infinite retry here is a temporary solution to the `ErrSchemaStorageUnresolved` caused by | |||
// DDL puller lagging too much. | |||
startTime := time.Now() |
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.
startTime
is not used somewhere else
Co-authored-by: amyangfei <[email protected]>
Signed-off-by: Neil Shen <[email protected]>
/merge |
This pull request has been accepted and is ready to merge. Commit hash: cf17861
|
@overvenus: 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. |
err := retry.Do(ctx, func() error { | ||
var err error | ||
snap, err = s.getSnapshot(ts) | ||
if time.Since(startTime) >= 5*time.Minute && isRetryable(err) { | ||
now := time.Now() | ||
if now.Sub(logTime) >= 30*time.Second && isRetryable(err) { |
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.
how about use time.Since
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.
time.Since
calls time.Now()
internally, and time.Now()
invokes a syscall clock_gettime
. The current approach is more performant.
/run-kafka-tests |
1 similar comment
/run-kafka-tests |
Codecov Report
@@ Coverage Diff @@
## master #3187 +/- ##
================================================
- Coverage 57.2251% 56.8805% -0.3446%
================================================
Files 163 211 +48
Lines 19453 22709 +3256
================================================
+ Hits 11132 12917 +1785
- Misses 7261 8479 +1218
- Partials 1060 1313 +253 |
/run-kafka-integration-test |
In response to a cherrypick label: new pull request created: #3197. |
In response to a cherrypick label: new pull request created: #3198. |
In response to a cherrypick label: new pull request created: #3199. |
In response to a cherrypick label: new pull request created: #3200. |
What problem does this PR solve?
Verbose some critical logs.
Check List
Tests
Related changes
Release note