mirror of
https://github.com/apache/druid.git
synced 2025-03-03 07:49:13 +00:00
fix according to CR
This commit is contained in:
parent
8af9598157
commit
a66425fe2f
@ -139,10 +139,16 @@ public class DruidServer implements Comparable
|
||||
}
|
||||
|
||||
dataSource.addSegment(segmentId, segment);
|
||||
if (!segments.containsKey(segmentId)) {
|
||||
segments.put(segmentId, segment);
|
||||
currSize += segment.getSize();
|
||||
|
||||
DataSegment shouldNotExist = segments.get(segmentId);
|
||||
|
||||
if (shouldNotExist != null) {
|
||||
log.warn("Asked to add data segment that already exists!? server[%s], segment[%s]", getName(), segmentId);
|
||||
return this;
|
||||
}
|
||||
|
||||
segments.put(segmentId, segment);
|
||||
currSize += segment.getSize();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@ -180,10 +186,9 @@ public class DruidServer implements Comparable
|
||||
}
|
||||
|
||||
dataSource.removePartition(segmentId);
|
||||
if (segments.containsKey(segmentId)) {
|
||||
segments.remove(segmentId);
|
||||
currSize -= segment.getSize();
|
||||
}
|
||||
|
||||
segments.remove(segmentId);
|
||||
currSize -= segment.getSize();
|
||||
|
||||
if (dataSource.isEmpty()) {
|
||||
dataSources.remove(dataSource.getName());
|
||||
|
Loading…
x
Reference in New Issue
Block a user