Bug #2544
RST Converter map not thread safe
Status: | Resolved | Start date: | 05/10/2016 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | J. Wienke | % Done: | 100% | |
Category: | Java | |||
Target version: | rsb-0.13 |
Description
During system start one of my local servers could not be activated because the internal informer crashed because of a concurrent modification exception. The converter map seems to be not thread safe.
Exception:
Caused by: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429) at java.util.HashMap$KeyIterator.next(HashMap.java:1453) at rsb.converter.DefaultConverterRepository.getConvertersForSerialization(DefaultConverterRepository.java:70) at rsb.Informer.<init>(Informer.java:243) at rsb.Factory.createInformer(Factory.java:368) at rsb.patterns.LocalMethod.<init>(LocalMethod.java:89) at rsb.patterns.LocalServer.addMethod(LocalServer.java:82)
Associated revisions
Make DefaultConverterRepository thread-safe
Use a ConcurrentHashMap instead of a normal one. Also reduce the
visibility of the warning message in case a converter is replaced and
document the replacing behavior.
(cherry picked from commit 0dce4827849d40bc3fcfbf6b3427b271862e2d67)
History
#1 Updated by M. Pohling almost 7 years ago
Sorry for missing
tag but reediting afterwards is restricted.
#2 Updated by M. Pohling almost 7 years ago
M. Pohling wrote:
Sorry for missing pre tag but reediting afterwards is restricted.
#3 Updated by J. Moringen almost 7 years ago
- Description updated (diff)
M. Pohling wrote:
Sorry for missing
<
pre>
tag but reediting afterwards is restricted.
Here you go.
#4 Updated by J. Wienke almost 7 years ago
I think we should make DefaultConverterRepository
thread-safe since it is something global.
#5 Updated by J. Wienke almost 7 years ago
- Status changed from New to In Progress
- Assignee set to J. Wienke
#6 Updated by J. Wienke almost 7 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset rsb-java|0dce4827849d40bc3fcfbf6b3427b271862e2d67.