fix ConcurrentModificationException in CachingClusteredClient.run() (#3278)

* fix ConcurrentModificationException in CachingClusteredClient.run()

* obtain new copy of PartitionHolder to avoid potential multi-threads read/write issue
This commit is contained in:
kaijianding 2016-07-29 10:52:50 +08:00 committed by Gian Merlino
parent 884017d981
commit 1fa681934c
1 changed files with 2 additions and 2 deletions

View File

@ -244,7 +244,7 @@ public class VersionedIntervalTimeline<VersionType, ObjectType> implements Timel
new TimelineObjectHolder<VersionType, ObjectType>(
object.getTrueInterval(),
object.getVersion(),
object.getPartitionHolder()
new PartitionHolder<ObjectType>(object.getPartitionHolder())
)
);
}
@ -453,7 +453,7 @@ public class VersionedIntervalTimeline<VersionType, ObjectType> implements Timel
new TimelineObjectHolder<VersionType, ObjectType>(
timelineInterval,
val.getVersion(),
val.getPartitionHolder()
new PartitionHolder<ObjectType>(val.getPartitionHolder())
)
);
}