Committed by
Yuta Higuchi
GossipLinkStore: removedLinks could be accessed concurrently by advertisement
Change-Id: I64cc3c5614182b6d6a8c2bf1dfa99e3f25fb9817
Showing
1 changed file
with
1 additions
and
2 deletions
... | @@ -19,7 +19,6 @@ import com.google.common.base.Function; | ... | @@ -19,7 +19,6 @@ import com.google.common.base.Function; |
19 | import com.google.common.collect.FluentIterable; | 19 | import com.google.common.collect.FluentIterable; |
20 | import com.google.common.collect.HashMultimap; | 20 | import com.google.common.collect.HashMultimap; |
21 | import com.google.common.collect.ImmutableList; | 21 | import com.google.common.collect.ImmutableList; |
22 | -import com.google.common.collect.Maps; | ||
23 | import com.google.common.collect.SetMultimap; | 22 | import com.google.common.collect.SetMultimap; |
24 | 23 | ||
25 | import org.apache.commons.lang3.RandomUtils; | 24 | import org.apache.commons.lang3.RandomUtils; |
... | @@ -118,7 +117,7 @@ public class GossipLinkStore | ... | @@ -118,7 +117,7 @@ public class GossipLinkStore |
118 | private final SetMultimap<DeviceId, LinkKey> dstLinks = createSynchronizedHashMultiMap(); | 117 | private final SetMultimap<DeviceId, LinkKey> dstLinks = createSynchronizedHashMultiMap(); |
119 | 118 | ||
120 | // Remove links | 119 | // Remove links |
121 | - private final Map<LinkKey, Timestamp> removedLinks = Maps.newHashMap(); | 120 | + private final Map<LinkKey, Timestamp> removedLinks = new ConcurrentHashMap<>(); |
122 | 121 | ||
123 | @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) | 122 | @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) |
124 | protected DeviceClockService deviceClockService; | 123 | protected DeviceClockService deviceClockService; | ... | ... |
-
Please register or login to post a comment