feat(client): add call timeout to log stream appender#474
Merged
Conversation
This was referenced Jun 12, 2023
Member
Author
|
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
Codecov ReportPatch coverage has no change and project coverage change:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## lsa_close_in_callback #474 +/- ##
=========================================================
- Coverage 62.65% 62.49% -0.17%
=========================================================
Files 133 133
Lines 18372 18415 +43
=========================================================
- Hits 11511 11508 -3
- Misses 6291 6340 +49
+ Partials 570 567 -3
☔ View full report in Codecov by Sentry. |
This PR adds a call timeout to the log stream appender. It helps the log stream appender not to be blocked. LogStreamAppender can be blocked at the following points: - (a) Waiting for the pipeline to have room - (b) Flow-controlled when calling RPC - (c) Stucked server - (d) Slow callback ``` +------+ +-------------------------+ +--------+ | | | LogStreamAppender | | | | | | | | | | | | (a)----------------(b) | | | | +--AppendBatch--->| pipeline queue |--gRPC request->| | | User | | +----------------+ | | | | code | | | | Varlog | | | | +----------------+ | | | | | | | callback | | | | | |<--Callback-+----| processing |<-gRPC response-+ | | | | (c) goroutine (d) | | | | | | +----------------+ | | | +------+ +-------------------------+ +--------+ ``` When a user configures call timeout by using `pkg/varlog.WithCallTimeout`, the `pkg/varlog.(LogStreamAppender).AppendBatch` or its callback function can return ErrCallTimeout when above situations.
869135d to
77b8de8
Compare
Member
Author
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What this PR does
This PR adds a call timeout to the log stream appender. It helps the log stream appender not to be
blocked. LogStreamAppender can be blocked at the following points:
When a user configures call timeout by using
pkg/varlog.WithCallTimeout, thepkg/varlog.(LogStreamAppender).AppendBatchor its callback function can return ErrCallTimeout whenabove situations.