From 1fa681934c5d768ca941f028f5c4b9638cd1a70d Mon Sep 17 00:00:00 2001 From: kaijianding Date: Fri, 29 Jul 2016 10:52:50 +0800 Subject: [PATCH] fix ConcurrentModificationException in CachingClusteredClient.run() (#3278) * fix ConcurrentModificationException in CachingClusteredClient.run() * obtain new copy of PartitionHolder to avoid potential multi-threads read/write issue --- .../java/io/druid/timeline/VersionedIntervalTimeline.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/io/druid/timeline/VersionedIntervalTimeline.java b/common/src/main/java/io/druid/timeline/VersionedIntervalTimeline.java index 04918690797..743492fc1bd 100644 --- a/common/src/main/java/io/druid/timeline/VersionedIntervalTimeline.java +++ b/common/src/main/java/io/druid/timeline/VersionedIntervalTimeline.java @@ -244,7 +244,7 @@ public class VersionedIntervalTimeline implements Timel new TimelineObjectHolder( object.getTrueInterval(), object.getVersion(), - object.getPartitionHolder() + new PartitionHolder(object.getPartitionHolder()) ) ); } @@ -453,7 +453,7 @@ public class VersionedIntervalTimeline implements Timel new TimelineObjectHolder( timelineInterval, val.getVersion(), - val.getPartitionHolder() + new PartitionHolder(val.getPartitionHolder()) ) ); }