apache / incubator-hugegraph

A graph database that supports more than 100+ billion data, high performance and scalability (Include OLTP Engine & REST-API & Backends)
https://hugegraph.apache.org
Apache License 2.0
2.63k stars 517 forks source link

feat(store): integrate `store-grpc`&`store-common`&`store-client` #2476

Closed Pengzna closed 6 months ago

Pengzna commented 6 months ago

subtask of https://github.com/apache/incubator-hugegraph/issues/2265, this PR mainly introduce the store-client module


During the code review, I found the following issues:

  1. HgStoreClient can hold multiple HgStoreSession to maintain multiple connections, but now it only holds one.
  2. MultiNodeSessionFactory doesn't consider the case of multiple instances.
  3. HgSessionManager now is constructed by SPI, but it seems to have only one implementation class and thus does not require SPI?
  4. NodeTxSessionProxy.clean()only uses the first node's cleaning result to determine whether the overall failure occurs. If subsequent nodes fail, we will not be able to detect it.
  5. Duplicate code: like getHeader() method

For the store-client submodule, its structure can be seen in detailed docs.

Note: code style including comments will be handled uniformly in future related PRs

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 0% with 1664 lines in your changes are missing coverage. Please review.

:exclamation: No coverage uploaded for pull request base (pd-store-dev@3dd06f2). Click here to learn what that means.

Files Patch % Lines
...che/hugegraph/store/client/NodeTxSessionProxy.java 0.00% 403 Missing :warning:
.../apache/hugegraph/store/client/NodeTxExecutor.java 0.00% 169 Missing :warning:
...n/java/org/apache/hugegraph/store/HgScanQuery.java 0.00% 103 Missing :warning:
...graph/store/client/HgStoreNodePartitionerImpl.java 0.00% 95 Missing :warning:
...che/hugegraph/store/client/HgStoreNodeManager.java 0.00% 85 Missing :warning:
...org/apache/hugegraph/store/client/util/Base58.java 0.00% 74 Missing :warning:
...gegraph/store/client/util/HgStoreClientConfig.java 0.00% 73 Missing :warning:
...hugegraph/store/client/util/HgStoreClientUtil.java 0.00% 71 Missing :warning:
...che/hugegraph/store/client/util/HgBufferProxy.java 0.00% 61 Missing :warning:
...g/apache/hugegraph/store/client/util/HgAssert.java 0.00% 53 Missing :warning:
... and 32 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## pd-store-dev #2476 +/- ## =============================================== Coverage ? 61.07% Complexity ? 827 =============================================== Files ? 579 Lines ? 46206 Branches ? 6280 =============================================== Hits ? 28220 Misses ? 15169 Partials ? 2817 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

VGalaxies commented 6 months ago

merge directly into the master branch after #2498...

codecov-commenter commented 6 months ago

Codecov Report

Attention: Patch coverage is 0% with 1664 lines in your changes are missing coverage. Please review.

Project coverage is 58.83%. Comparing base (3a1618f) to head (6be946b).

Files Patch % Lines
...che/hugegraph/store/client/NodeTxSessionProxy.java 0.00% 403 Missing :warning:
.../apache/hugegraph/store/client/NodeTxExecutor.java 0.00% 169 Missing :warning:
...n/java/org/apache/hugegraph/store/HgScanQuery.java 0.00% 103 Missing :warning:
...graph/store/client/HgStoreNodePartitionerImpl.java 0.00% 95 Missing :warning:
...che/hugegraph/store/client/HgStoreNodeManager.java 0.00% 85 Missing :warning:
...org/apache/hugegraph/store/client/util/Base58.java 0.00% 74 Missing :warning:
...gegraph/store/client/util/HgStoreClientConfig.java 0.00% 73 Missing :warning:
...hugegraph/store/client/util/HgStoreClientUtil.java 0.00% 71 Missing :warning:
...che/hugegraph/store/client/util/HgBufferProxy.java 0.00% 61 Missing :warning:
...g/apache/hugegraph/store/client/util/HgAssert.java 0.00% 53 Missing :warning:
... and 32 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2476 +/- ## ============================================ - Coverage 65.64% 58.83% -6.81% Complexity 827 827 ============================================ Files 518 579 +61 Lines 42987 46232 +3245 Branches 5976 6275 +299 ============================================ - Hits 28218 27202 -1016 - Misses 11957 16275 +4318 + Partials 2812 2755 -57 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.