History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: MULE-893
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Andrew Cooke
Reporter: Holger Hoffstaette
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Mule

Clarify/reachitect MuleMessage property mutability & handling

Created: 27/Jun/06 01:06 PM   Updated: 16/May/08 09:18 AM
Component/s: Core: (other)
Affects Version/s: None
Fix Version/s: 2.0.0-RC1, 1.4.4

Time Tracking:
Not Specified

Issue Links:
Block
 
Related
 

Labels:
User impact: High


 Description  « Hide
Even though we've made great progress the mutability of MuleMessage and its properties is still a big problem. It can manifest itself in all sorts of inconsistent properties or even the occasional null value seemingly being set during construction (very rare but ask me for stack trace). The usual suspects are always creation of MuleEvent/MuleMessage and the adding/copying of message properties. Since these properties are all lunmped together in a single map and often modified in nonatomic (yet by themselves threadsafe!) ways, inconsistent message properties can happen and are next to impossible to find.
Ross suggested a multi-level hierarchy of properties (application, session, request) to reduce the chance that properties and consumers of the message scribble over each other. Another idea that I had is explicit locking so that clients can introduce transactional blocks for modifications/snapshot creation etc., however this needs more thought too and would not solve aliasing problems since scribbling would simply happen serialized.
The problem is compounded by mutability and nonatomic access/state management, so we need to address both, ideally by doing away with mutability as much as possible.

 All   Comments   Work Log   Change History   Transitions   FishEye      Sort Order: Ascending order - Click to sort in descending order
Holger Hoffstaette - 27/Jun/06 01:49 PM
In fact one thing we might need is some kind of "copy-on-write" or versioning on the message.

Lajos Moczar - 11/Sep/06 11:34 AM
This is an important issue to trace thru and document. Myself, I'd opt for a combination of MuleMessage write rules and versioning. First need to document what object is allowed to alter message properties. Then, we should come up with a way to version the properties. One option is to create a properties object that includes information on which component modified the property and when. Auto-incremented version numbers would help us better understand how many times the property has been modified. Another option would be to log the modifier events within the MuleMessage as a sort of historical record that can be dumped or accessed during debugging.

Andrew Perepelytsya - 24/Apr/07 12:42 PM
Descoping the 1.4.1, unset Fix Version for some issues.

Andrew Cooke - 04/Jul/07 11:53 AM
I am going to look at this. I don't intend to make any major changes yet, but want to understand the issues better.

If I think there's a simple initial solution I'll post back here.


Andrew Cooke - 07/Jul/07 10:33 AM
Initial progress - turned out the reason we were seeing this s much in the VMLoanBrokerSynchronousTestCase was because it wasn't synchronous. So fixed that.

Andrew Cooke - 18/Jul/07 04:19 PM
I made some changes to the 1564 trunk. It wasn't what Holger was expecting. Usual story.

Andreas Guenther - 06/Nov/07 12:55 PM
Travis or Andrew C,

Can you take this issue into the 2.x stream, please.

-Andreas


Andrew Cooke - 06/Nov/07 02:25 PM
this was done long ago - i should have closed it then (in fact i am today working on changes ross has made to this in 2.x)

if i'm wrong, please shout!


Andrew Cooke - 06/Nov/07 02:27 PM
memory slowly returns...

i left this open because i always saw my fix as something of a intermediary step. but things are moving on (see comments above wrt ross) so i guess it does make sense to close this.