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

Bug fix for cluster server connection setup #361

Merged
merged 1 commit into from
Apr 9, 2013

Conversation

mattwillo
Copy link
Contributor

Hi,

I have committed a patch that fixes Elastica\Client::_initConnections();

The config call and server setup wasn't working correctly with an array server setup.

@ruflin
Copy link
Owner

ruflin commented Apr 8, 2013

@munkie @webpatser @christeredvartsen Can you check if this is actually a bug or if it should actually be able to handle an array?

@mattwillo Can you post the structure of your servers array?

@mattwillo
Copy link
Contributor Author

@ruflin My array looks like this

$servers = array(
array('host' => 'foo.mydomain.com', 'port' => 9200),
array('host' => 'bar.mydomain.com', 'port' => 9200)
);

@ruflin
Copy link
Owner

ruflin commented Apr 9, 2013

Ok. I think you are right and the issues is really the foreach. What is important to note is that servers is deprecated and connections should be used ...

ruflin added a commit that referenced this pull request Apr 9, 2013
Bug fix for cluster server connection setup
@ruflin ruflin merged commit dbc7ead into ruflin:master Apr 9, 2013
@mattwillo
Copy link
Contributor Author

I understand your point, but I think it is a nice feature to have, other clusters (e.g. RabbitMQ) provide the same functionality that will allow you to use a Connection to create one or just pass an array and let the library handle it.

I would consider keeping this as a feature.

Thanks

Matt

@ruflin
Copy link
Owner

ruflin commented Apr 9, 2013

Ok I think we have a small misunderstanding here. servers is deprecated, because it was replaced through the keyword connections (in the config option). The array structure etc. is still the same. If you look at this pull request from @munkie it will be even extended. #357 So don't worry, it is not planned to remove this feature.

@mattwillo
Copy link
Contributor Author

Yes, that was a misunderstanding. Excellent, the Pool functionality looks great!

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