[infinispan-dev] ISPN-2281 effect on Infinispan Server

Galder Zamarreño galder at redhat.com
Fri May 3 06:49:32 EDT 2013


Here's what I replied in a separate email last. Since then the issue has been sorted:

> The reason I designed a byte[] specific Equivalence class is to avoid
doing instanceof on the type passed. This would slow things in a
critical path, hence, I designed a purely byte[] Equivalence class,
and why there's no instanceof in AnyEquivalence either, to be as
performant as possible.

So yeah, as you suggest, the workaround would be for AnyEquivalence to
check if the parameter is a byte[], in which case, delegate to
ByteArrayEquivalence, but to reiterate, this is only a workaround and
not the optimal solution.

I also checked if the Hot Rod server could add this itself to the
caches, but this is complex stuff because it's given a cache manager
already built, so it'd need to go and change the default configuration
to apply this change programmatically, which is not easy because
you're given a Configuration object and not the buillder, and making
Configuration mutable just for that, where you're just trying to
override what it's been configured in the cache manager is a hack.

Since we controlled the way the servers are started via Infinispan
Server, I assumed we controlled its configuration, hence I expected
configuring BAEquivalence to be a safe assumption. We've made a bad
job of waiting to integrate this and test Infinispan Server until now,
with 7 days since the pull req has been up. Maybe the pull req test
execution needs to also execute the Infinispan Servers testsuite
automatically to avoid future issues....

On May 2, 2013, at 5:05 PM, Tristan Tarrant <ttarrant at redhat.com> wrote:

> Hi all (Galder in particular),
> 
> the integration of ISPN-2281 has caused breakage of Infinispan Server 
> because the caches created by the server have key/value equivalence set 
> to AnyEquivalence instead of ByteArrayEquivalence (like the testsuite does).
> I believe the fix rests in making AnyEquivalence true to its name and 
> handle array equivalence too.
> 
> HotRod on Infinispan Server is essentially broken until this is fixed.
> 
> Tristan
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


--
Galder Zamarreño
galder at redhat.com
twitter.com/galderz

Project Lead, Escalante
http://escalante.io

Engineer, Infinispan
http://infinispan.org




More information about the infinispan-dev mailing list