mirror of https://github.com/apache/druid.git
Need more synchronizing in DruidDataSource.
This commit is contained in:
parent
290982433b
commit
c58a316437
|
@ -114,14 +114,17 @@ public class DruidDataSource
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
|
synchronized (lock) {
|
||||||
return "DruidDataSource{" +
|
return "DruidDataSource{" +
|
||||||
"properties=" + properties +
|
"properties=" + properties +
|
||||||
", partitions=" + segmentsHolder.toString() +
|
", partitions=" + segmentsHolder.toString() +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public ImmutableDruidDataSource toImmutableDruidDataSource()
|
public ImmutableDruidDataSource toImmutableDruidDataSource()
|
||||||
{
|
{
|
||||||
|
synchronized (lock) {
|
||||||
return new ImmutableDruidDataSource(
|
return new ImmutableDruidDataSource(
|
||||||
name,
|
name,
|
||||||
ImmutableMap.copyOf(properties),
|
ImmutableMap.copyOf(properties),
|
||||||
|
@ -129,4 +132,5 @@ public class DruidDataSource
|
||||||
ImmutableSet.copyOf(segmentsHolder)
|
ImmutableSet.copyOf(segmentsHolder)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue