[infinispan-dev] Read flags from command or context?

Galder Zamarreño galder at jboss.org
Tue Jan 3 09:15:52 EST 2012


Hi,

Re: https://github.com/galderz/infinispan/commit/fa419a1b22f56faa49e66588728fa9d580aafaed#commitcomment-833243 and https://issues.jboss.org/browse/ISPN-1652

Back when Infinispan started, flags travelled down via thread locals and the context. Now these flags are even part of the commands in order to travel accross different nodes.

As indicated in the JIRA and my comment, solving this problem by recreating context for each command is complex (what type of context? remote? local?… I had a rather hacky looking solution but broke tx recovery).

I do see however commands a more natural fit for flags. We use flags to invoke an operation with those flags. To me, flags should really be migrated off context into command and read them consistenly from command which btw solves this problem rather easily.

I'm aware that I might be missing some odd use case where flags need to be in context but can't think of it right now, hence this email thread, to see if someone else can spot it.

Cheers,
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache




More information about the infinispan-dev mailing list