feat(storagenode): add pipelined Append RPC handler#457
Merged
Conversation
This was referenced May 23, 2023
Member
Author
|
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
3 tasks
2a8118a to
317743d
Compare
Codecov ReportPatch coverage:
❗ 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 @@
## grpc_server_initial_flow_control_window_size #457 +/- ##
================================================================================
- Coverage 63.18% 63.15% -0.03%
================================================================================
Files 132 132
Lines 17958 18145 +187
================================================================================
+ Hits 11346 11459 +113
- Misses 6040 6120 +80
+ Partials 572 566 -6
☔ View full report in Codecov by Sentry. |
317743d to
80abf51
Compare
3 tasks
82c1e97 to
3d0cdbf
Compare
80abf51 to
0579220
Compare
3d0cdbf to
c2e0d4d
Compare
0579220 to
918f845
Compare
c2e0d4d to
dd3061c
Compare
918f845 to
5bc3f8b
Compare
hungryjang
reviewed
Jun 2, 2023
dd3061c to
8b623b0
Compare
5bc3f8b to
20e31e7
Compare
Base automatically changed from
grpc_server_initial_flow_control_window_size
to
main
June 4, 2023 08:01
20e31e7 to
4ff8d8c
Compare
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.4.0 to 3.5.0. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](golangci/golangci-lint-action@v3.4.0...v3.5.0) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.3 to 1.8.4. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](stretchr/testify@v1.8.3...v1.8.4) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…/golangci-lint-action-3.5.0 build(deps): bump golangci/golangci-lint-action from 3.4.0 to 3.5.0
…tretchr/testify-1.8.4 build(deps): bump github.com/stretchr/testify from 1.8.3 to 1.8.4
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.9.1 to 0.9.3. - [Release notes](https://github.com/golang/tools/releases) - [Commits](golang/tools@v0.9.1...v0.9.3) --- updated-dependencies: - dependency-name: golang.org/x/tools dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…/tools-0.9.3 build(deps): bump golang.org/x/tools from 0.9.1 to 0.9.3
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.25.3 to 2.25.5. - [Release notes](https://github.com/urfave/cli/releases) - [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md) - [Commits](urfave/cli@v2.25.3...v2.25.5) --- updated-dependencies: - dependency-name: github.com/urfave/cli/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…rfave/cli/v2-2.25.5 build(deps): bump github.com/urfave/cli/v2 from 2.25.3 to 2.25.5
hungryjang
approved these changes
Jun 7, 2023
Member
Author
This patch changes the Append RPC handler to support pipelined requests and does not change the client's API. Therefore, users can use Append API transparently. Supporting pipelined requests can lead to overhead since it is necessary to have additional goroutines and concurrent queues. To lower additional overhead, this change uses [reader-biased mutex](https://github.com/puzpuzpuz/xsync#rbmutex) instead of built-in RWMutex to avoid shared lock contention. As a result of experimentations, this PR showed very little overhead. Furthermore, we can improve the existing Append API more efficiently [using a long-lived stream](https://grpc.io/docs/guides/performance/#general): the current implementation creates a new stream whenever calling Append API, which leads to unnecessary tasks such as RPC initiation. We can reuse long-lived streams by changing client API. See this issue at #458. This PR implements server-side parts of LogStreamAppender mentioned in #433. It also can be used for pipelining generic Append RPC said in #441.
Member
Author
|
Graphite rebased this pull request as part of a merge. |
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 patch changes the Append RPC handler to support pipelined requests and does not change the client's API. Therefore, users can use Append API transparently.
Supporting pipelined requests can lead to overhead since it is necessary to have additional goroutines and concurrent queues. To lower additional overhead, this change uses reader-biased mutex instead of built-in RWMutex to avoid shared lock contention. As a result of experimentations, this PR showed very little overhead. Furthermore, we can improve the existing Append API more efficiently using a long-lived stream: the current implementation creates a new stream whenever calling Append API, which leads to unnecessary tasks such as RPC initiation. We can reuse long-lived streams by changing client API. See this issue at #458.
Which issue(s) this PR resolves
This PR implements server-side parts of LogStreamAppender mentioned in #433. It also can be used for pipelining generic Append RPC said in #441.