Skip to content
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(store): integrate store-grpc&store-common&store-client #2476

Merged
merged 6 commits into from
Apr 5, 2024

Conversation

Pengzna
Copy link
Contributor

@Pengzna Pengzna commented Mar 12, 2024

subtask of #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

@imbajin imbajin changed the title chore(pd-store-dev): integrate store-grpc, store-common, store-client into hugegraph feat(store-dev): integrate store-grpc, store-common, store-client into hugegraph Mar 12, 2024
Copy link

codecov bot commented Mar 12, 2024

Codecov Report

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

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@VGalaxies VGalaxies self-assigned this Mar 12, 2024
@VGalaxies VGalaxies added the store Store module label Mar 12, 2024
@VGalaxies VGalaxies self-requested a review March 12, 2024 06:51
@Pengzna Pengzna marked this pull request as ready for review March 16, 2024 11:40
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. ci-cd Build or deploy feature New feature labels Mar 16, 2024
VGalaxies
VGalaxies previously approved these changes Mar 17, 2024
Copy link
Contributor

@VGalaxies VGalaxies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 17, 2024

package org.apache.hugegraph.store;

public interface HgTkvEntry {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this name is a bit hard to understand, to be improved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we will fix it in the next code style related PR

/**
* created on 2021/10/26
*/
public class HgPrivate {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this name is a bit hard to understand, to be improved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto, and this class seems to be useless, we will consider to remove it in futhur PR

Comment on lines +31 to +32
rpc Table(TableReq) returns (FeedbackRes){};
rpc Graph(GraphReq) returns (FeedbackRes){};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Table/Graph looks a little strange, where are these two interfaces used , and what content do they return?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are mainly used in org.apache.hugegraph.store.node.grpc.HgStoreNodeService (the related migration has not been completed yet, and store-node will be migrated after the migration of this pr, store-core and store-rocksdb).

These two interfaces mainly define the CRUD operations related to table and graph. They will return true or false depending on whether these operations have failed or not.

javeme
javeme previously approved these changes Mar 30, 2024
Copy link
Contributor

@javeme javeme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: fix comments later

@VGalaxies
Copy link
Contributor

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

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Apr 3, 2024
@Pengzna Pengzna changed the base branch from pd-store-dev to master April 3, 2024 10:57
@Pengzna Pengzna dismissed stale reviews from JackyYangPassion, javeme, and VGalaxies April 3, 2024 10:57

The base branch was changed.

@Pengzna Pengzna requested a review from VGalaxies April 3, 2024 10:57
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Apr 3, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 3, 2024

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 ⚠️
.../apache/hugegraph/store/client/NodeTxExecutor.java 0.00% 169 Missing ⚠️
...n/java/org/apache/hugegraph/store/HgScanQuery.java 0.00% 103 Missing ⚠️
...graph/store/client/HgStoreNodePartitionerImpl.java 0.00% 95 Missing ⚠️
...che/hugegraph/store/client/HgStoreNodeManager.java 0.00% 85 Missing ⚠️
...org/apache/hugegraph/store/client/util/Base58.java 0.00% 74 Missing ⚠️
...gegraph/store/client/util/HgStoreClientConfig.java 0.00% 73 Missing ⚠️
...hugegraph/store/client/util/HgStoreClientUtil.java 0.00% 71 Missing ⚠️
...che/hugegraph/store/client/util/HgBufferProxy.java 0.00% 61 Missing ⚠️
...g/apache/hugegraph/store/client/util/HgAssert.java 0.00% 53 Missing ⚠️
... and 32 more
Additional details and impacted files
@@             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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

VGalaxies
VGalaxies previously approved these changes Apr 5, 2024
fix: maven rat plugin exist partial failure
@VGalaxies VGalaxies changed the title feat(store-dev): integrate store-grpc, store-common, store-client into hugegraph feat(store): integrate store-grpc&store-common&store-client Apr 5, 2024
Copy link
Member

@imbajin imbajin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll enhance some TODOs later (merge it first)

@imbajin imbajin merged commit 1228dec into apache:master Apr 5, 2024
14 checks passed
@imbajin imbajin added this to the 1.5.0 milestone Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-cd Build or deploy feature New feature lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files. store Store module
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants