pat / thinking-sphinx

Sphinx/Manticore plugin for ActiveRecord/Rails
http://freelancing-gods.com/thinking-sphinx
MIT License
1.63k stars 468 forks source link

Option for Riddle to not shuffle servers #279

Closed ngan closed 13 years ago

ngan commented 13 years ago

Is there a reason why the servers are shuffled when they are assigned to Riddle? I can't really see the benefit to doing this... Is there an option to not do this?

pat commented 13 years ago

It's just a vague attempt at load balancing, without dealing with any clever logic. And nope, there's no option for it - if you can offer a patch though, I'll certainly consider merging it :)

ngan commented 13 years ago

Sure I'll come up with a patch, no problem. Should this change be made in the Riddle repo? Or this one?

ngan commented 13 years ago

@freelancing-god I'm starting to think that it would make more sense for Riddle should not be shuffling at all. If shuffling is desired, that logic should be in Thinking-Sphinx when it initializes the Riddle::Client. e.g.:

Riddle::Client.new(servers.shuffle)

pat commented 13 years ago

Yeah, that's a fair call. Feel free to patch both so that's the case.

ngan commented 13 years ago

Patch for Riddle: https://github.com/freelancing-god/riddle/pull/37

Sphinx patch coming soon...

ngan commented 13 years ago

Patch for TS: https://github.com/freelancing-god/thinking-sphinx/pull/281

pat commented 13 years ago

Patches merged, so closing this issue.