mirror of
https://github.com/apache/druid.git
synced 2025-02-17 15:35:56 +00:00
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…
x
Reference in New Issue
Block a user