mirror of https://github.com/apache/druid.git
restore server selector behaviour
This commit is contained in:
parent
3299900690
commit
1537bcf55a
|
@ -83,7 +83,12 @@ public class ServerSelector
|
|||
public QueryableDruidServer pick()
|
||||
{
|
||||
synchronized (this) {
|
||||
return Collections.min(servers, comparator);
|
||||
final int size = servers.size();
|
||||
switch (size) {
|
||||
case 0: return null;
|
||||
case 1: return servers.iterator().next();
|
||||
default: return Collections.min(servers, comparator);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue