-
Notifications
You must be signed in to change notification settings - Fork 46
Implement getting the cluster nodes list from nodes #135
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
Conversation
7a4659b
to
0448226
Compare
9dce8ff
to
b087be0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch and sorry for the long delay before the review. Please, consider some initial comments about the patch.
Please, factor out all unrelated changes into separate PRs: say, updating of Travis-CI jobs, Sophia → Vinyl update in the README, fix of the authentification issue (see below). Then squash all relevant commits: nobody is interesting in intermediate changes.
BTW, there is the task about distros updating (#123). I have pinged Alexander about that. |
ddcf29c
to
cf62582
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, rebase and squash changes. Factor out unrelated readme updates (I suggest to file separate PR to don't mix discussions, but don't insist: separate commit is ok too).
I look at the PR more or less briefly, so feel free to discuss certain points here or privately in text or voicely.
dca9fd8
to
b20057c
Compare
e1a3395
to
85bc56c
Compare
01df289
to
c25c651
Compare
c25c651
to
1576d2c
Compare
I decided to skip review ping-pong and reworked some parts of the patch where I guess I can improve things. I have made the following changes:
Maybe I missed to mention something in the list. @robinhood23rus Can you please give me feedback about the new version of the patch (force-pushed here). |
This feature adds the new optional arguments to the MeshConnection contructor: * `cluster_discovery_function` -- a name of the function which will be periodically called on a currently connected tarantool instance to update a list of MeshConnection addresses. * `cluster_discovery_delay` -- minimal amount of seconds between address list updates (default is 60 seconds). The update of addresses is performed right after successful connecting and before performing a request (if a minimal time passes). This commits changes the round robin retry strategy. Before it performs two attempts to connect to each address reconnect_max_attempts times (3 by default), now it do that only once. The new type of error is added: ConfigurationError. It is risen when a user provides incorrect configuration: say, one of provided addresses is not correct. The new type of warning is added: ClusterDiscoveryWarning. This warning is shown when a something went wrong during cluster discovery: say, one of returned addresses is not correct. Note the difference: a user provided configuration verified strictly, while a cluster discovery function result is filtered (with warnings) and good addresses are applied (if the list is not empty). Aside of the new functionality this commit improves compatibility of MeshConnection API with Connection. The following arguments are added to the MeshConnection constructor: `host`, `port`, `call_16`, `connection_timeout`. An address from `host` / `port` arguments is added to `addrs` (if provided) as the first item. Fixes #134.
1576d2c
to
d64c52b
Compare
Reorganized |
Changes ok. Approve |
Periodically call a user-defined Lua function on a node to obtain or
refresh the full cluster nodes list.
Resolves: #134