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

A client for Nebula Graph Database that support multi versions #59

Merged
merged 1 commit into from
Dec 13, 2021

Conversation

veezhang
Copy link
Contributor

@veezhang veezhang commented Dec 9, 2021

A client for Nebula Graph Database that support multi versions.

Those files in ccore/nebula/internal/thrift is copy from https://github.com/vesoft-inc/nebula-go .

@veezhang veezhang force-pushed the ccore branch 2 times, most recently from 02270c1 to ba842f6 Compare December 9, 2021 10:04
@veezhang veezhang changed the title add cloud core basic framework A client for Nebula Graph Database that support multi versions Dec 9, 2021
@veezhang veezhang requested a review from HarrisChu December 9, 2021 10:19
@veezhang veezhang force-pushed the ccore branch 3 times, most recently from 8e3f57b to 0fc1da0 Compare December 9, 2021 10:53
nianiaJR
nianiaJR previously approved these changes Dec 13, 2021
Copy link
Contributor

@nianiaJR nianiaJR left a comment

Choose a reason for hiding this comment

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

LGTM

return func(o *Options) {
WithGraphTLS(tlsConfig)
WithGraphTLS(tlsConfig)
WithGraphTLS(tlsConfig)
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing WithStorageTLS and WithMetaTLS ?

Client interface {
Graph() GraphClient
Meta() MetaClient
StorageAdmin() StorageAdminClient
Copy link
Contributor

Choose a reason for hiding this comment

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

can we call storageAdmin storage? for users, they don't know what is storageAdmin, but use it for storage?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is named according to thrift define, it is best not to introduce new terms.


if o.log == nil {
o.log = defaultOpts.log
}
Copy link
Contributor

Choose a reason for hiding this comment

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

why don't use if o.log == nil { o.log = noOpLogger{} } instead, don't need define defaultOpts

and check o.version same as o.log?

Copy link
Contributor Author

@veezhang veezhang Dec 13, 2021

Choose a reason for hiding this comment

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

Use the same entrance defaultOptions. If this future changes, only defaultOptions need to change.

V2_0_0 = types.V2_0_0
V2_5_0 = types.V2_5_0
V2_5_1 = types.V2_5_1
V2_6_0 = types.V2_6_0
Copy link
Contributor

Choose a reason for hiding this comment

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

https://github.com/vesoft-inc/nebula-go/pull/148/files, I see thrift code use 2.6.0, so we need fix this compile bug too, or we use 2.6.1 thrift code instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have fixed.

}

func (c *defaultMetaClient) Close() error {
return c.meta.open(c.driver)
Copy link
Contributor

Choose a reason for hiding this comment

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

use c.meta.close()?

}

func (c *defaultGraphClient) Close() error {
return c.graph.open(c.driver)
Copy link
Contributor

Choose a reason for hiding this comment

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

use c.graph.close() ?

}

func (c *defaultStorageAdminClient) Close() error {
return c.storageAdmin.open(c.driver)
Copy link
Contributor

Choose a reason for hiding this comment

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

use c.storageAdmin.close() ?

Copy link
Contributor

@kqzh kqzh left a comment

Choose a reason for hiding this comment

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

LGTM

@kqzh kqzh merged commit 3c9976d into vesoft-inc:master Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants