Details
-
Type:
Refactoring
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.0.1, 3.1.0, 3.1.1, 3.2.0, 3.3.0
-
Fix Version/s: 3.4.0
-
Component/s: Framework Core
-
Labels:None
Description
If a given serializable object has a method marked with @Persist and this method modifies the state of the object internally, calling serialization from multiple threads can cause undesired and unpredictable side effects. In particular, our AttributeDescriptor object is an example of this.
The best solution is to make serializable objects immutable and create their internal representation eagerly in the constructor instead of lazily using @Persist.
Issue Links
| This issue fixes: | ||||
| CARROT-692 | ConcurrentModificationException in the webapp's page content serving routine. |
|
|
|
I mark this as fixed, even though the PROPER way to fix this would be to either make serializable objects immutable OR write a wrapper for Persister which would disallow serialization of the same object in two concurrent threads (this is actually simple to write, but aesthetically nasty
.