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

Prevent application crash on init time #447

Merged
merged 4 commits into from
Apr 11, 2022
Merged

Conversation

aminmaghsodi
Copy link
Contributor

Prevent application crash on init time when less than all graphd servers are available.
In the current version of nebula-java, if any of the graphd servers mentioned in config, is not accessible, the app going to crash.

@xiajingchun xiajingchun requested a review from Aiee March 9, 2022 09:24
@Aiee
Copy link
Contributor

Aiee commented Mar 10, 2022

I believe it is reasonable to explicitly tell the user if any graphd server is down in the initialization phase, so the user will be notified at an early stage about the problem. What do you think?

Update:
I re-considered this change and found it could be helpful for a use case like this:
For a long-running cluster consisting of 5 graphd nodes, there are 2 graphd nodes that went down but the cluster is still functional, a user may try to connect the clustering filling all 5 graph addresses when init the client.

@Aiee
Copy link
Contributor

Aiee commented Mar 10, 2022

@aminmaghsodi
Copy link
Contributor Author

@aminmaghsodi
Copy link
Contributor Author

aminmaghsodi commented Mar 28, 2022

I believe it is reasonable to explicitly tell the user if any graphd server is down in the initialization phase, so the user will be notified at an early stage about the problem. What do you think?

Update: I re-considered this change and found it could be helpful for a use case like this: For a long-running cluster consisting of 5 graphd nodes, there are 2 graphd nodes that went down but the cluster is still functional, a user may try to connect the clustering filling all 5 graph addresses when init the client.

Thanks for your reply and re-consider your belief. If we say nebula graph is designed to be (semi) highly available and scalable, it means there shouldn't be any minor problem affects client, when other components can cover that problem. for example in this problem, when a graphd server is down, another graphd server is present and up in the cluster to cover requests. Consider a situation, when one of graphd services is down at the start time. what is happenning? Actually nothing. because n-1 graphd servers are running. this feature is considered in storaged servers very good. also it is considered in calling graphd service at the runtime. at the start time if some storage servers are down, client does not affect.
If you see, all other scalable data stores (like hadoop, hbase, cassandra, redis and so on) are designed in way that client, should not be affect in minor problem situations like "One of the REST apis of a huge cluster is down!"

@aminmaghsodi
Copy link
Contributor Author

I need an approve. anybody to help? :D

Copy link
Contributor

@Aiee Aiee left a comment

Choose a reason for hiding this comment

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

LGTM. Good job!

@Aiee Aiee merged commit 894a97a into vesoft-inc:master Apr 11, 2022
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.

2 participants