Skip to content

poolee integration to support multiple solr nodes#141

Open
Bangsheng wants to merge 9 commits into
lbdremy:masterfrom
Bangsheng:master
Open

poolee integration to support multiple solr nodes#141
Bangsheng wants to merge 9 commits into
lbdremy:masterfrom
Bangsheng:master

Conversation

@Bangsheng
Copy link
Copy Markdown

Hi,

I added poolee to support multiple solr nodes.

As a consequence, most of the old tests failed because the parameters to create the client have been changed. I modified the tests slightly and all the tests have been passed now. The only problem is that pool.request from poolee does not return the request object. To let the tests pass, I returned the created request option as a temporary solution. However, it won't affect the functionality of the module and this should be a problem of poolee. I also submitted a pull request to poolee to make the request function return the request object. Once that pull request get accepted, I will change it back to return the request object.

Thanks,
Bangsheng

@luketaverne
Copy link
Copy Markdown
Collaborator

I'll take a look over this in the next few days and test it out before pulling it.

It also looks like you edited almost every single line, mostly just for formatting purposes. This makes it a bit difficult for me to see if you changed anything else in the documents.

@Bangsheng
Copy link
Copy Markdown
Author

Thanks for your time to review this pull request. I am sorry I forgot to turn off my auto-formatting.

One more thing I need to mention, by saying multiple solr nodes, I mean solr cloud mode.

@lbdremy
Copy link
Copy Markdown
Owner

lbdremy commented Aug 4, 2015

It would be nice to support the old signature of the function createClient otherwise that's a breaking change, and I can see that it can be avoided. Also it would be nice to provide to poolee the agent given by argument of createClient. Just another thing you're right when you talk about the request object returned, this is really important to return it.

@Bangsheng
Copy link
Copy Markdown
Author

Hi Remy,

Thanks for reviewing my pull request.

  1. Support for old signature
    I was thinking whether to support the old signature before I started to make the change. I gave it up since I want to keep the <createClient> clean. Otherwise, unnecessary complexity will be added to <createClient>. For people who have only one solr node, they can still use the old version or they can make some slight change to use the new version. However, I can add support for old <createClient> if you insist.
  2. Pass agent to poolee
    Good point. I will check if I can do this with poolee. <Begin edit> I double checked poolee. There is no way to pass the agent direct to poolee. However, you can pass options for creating agent inside poolee. May I know what is the point to pass a pre-created agent instead of letting poolee create it? <End edit>
  3. Return the request object from poolee
    The author has not replied to my pull request yet. Right now, I am using a hack which returns the request option just to let the tests pass. Another solution is to have poolee2 published and switch back once poolee returns the request object.

Please let me know your opinion, then I will submit a new pull request if new changes are needed.

@Bangsheng
Copy link
Copy Markdown
Author

Also, I am thinking client.options.core should not be a property of client. core should be a parameter to all the request methods. This can bring several advantages.

  1. We don't need to create a client for each core. This is what a client should look like. And the original client is more like a collection/model.
  2. Client's resource can be shared by multiple cores. This help to prevent resource waste in situations where we have some hot cores and cold cores.

Please let me know if you like all these changes or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants