I'm not sure why this specific Flag behaves like this, but it's clear that Flags can break many things; I suspect originally they were meant to be internal-only, and I got them exposed when as a user I was having big performance trouble when doing Put operations of 1GB each and the damn thing would load the previous value from the MySQL backed Cachestore, while my puts didn't use the return value :)
Maybe it's time to reconsider this and split the flags up in "internal ones" and public API flags? It would be nice to limit the damage that end users can do, many flags could be taken away, or reshape our APIs to not really need so many (for example not having the put method return a value, or automating such optimisations with internal magic). +1 to perform the WSC only on the primary owner, that seems like a severe bug? On 30 August 2016 at 08:30, Radim Vansa <rva...@redhat.com> wrote: > I've noticed that SKIP_CACHE_LOAD flag is ignored when performing the > write skew check (the old entry is loaded from cache store), though, it > is not ignored (and the entry is not loaded) when there's > CACHE_MODE_LOCAL [2]. Is that intended behaviour, or just "conserved" by > tests? > > The flag itself allows to break things [3], so I guess that user sets > the flag only when he knows that there is no such entry in cache store > and it's safe to not load it. > > Moreover, I don't understand why the WSC should be performed on > originator (or backup owners) [4]. > > Thanks for explanations (I'll try to add them as comments to the code - > or make the reasoning more obvious). > > Radim > > [1] > https://github.com/infinispan/infinispan/blob/master/core/src/test/java/org/infinispan/api/flags/FlagsEnabledTest.java#L132 > [2] > https://github.com/infinispan/infinispan/blob/master/core/src/test/java/org/infinispan/api/flags/FlagsEnabledTest.java#L96 > [3] > https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/context/Flag.java#L89 > [4] > https://github.com/infinispan/infinispan/blob/master/core/src/test/java/org/infinispan/api/flags/FlagsEnabledTest.java#L85 > > > -- > Radim Vansa <rva...@redhat.com> > JBoss Performance Team > > _______________________________________________ > infinispan-dev mailing list > infinispan-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/infinispan-dev _______________________________________________ infinispan-dev mailing list infinispan-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/infinispan-dev