-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat(storagenode): add pipelined Append RPC handler #457
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
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
82c1e97
to
3d0cdbf
Compare
80abf51
to
0579220
Compare
3d0cdbf
to
c2e0d4d
Compare
0579220
to
918f845
Compare
c2e0d4d
to
dd3061c
Compare
918f845
to
5bc3f8b
Compare
dd3061c
to
8b623b0
Compare
5bc3f8b
to
20e31e7
Compare
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] <[email protected]>
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] <[email protected]>
…/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] <[email protected]>
…/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] <[email protected]>
…rfave/cli/v2-2.25.5 build(deps): bump github.com/urfave/cli/v2 from 2.25.3 to 2.25.5
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.
Graphite rebased this pull request as part of a merge. |
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.