Index based queries also require the previous value on a write - unless we can get "strongly typed caches" giving guarantees about the class to represent the content of a cache to be unique.
Essentially we only need to know the type of the previous object. It might be worth having a way to load the type metadata if the previous value only.
Sorry I hope to not derail the thread but let's remind that we hope to evolve beyond "flags are expected to break stuff" ; we never got to it but search the mailing list.
Since flags are exposed to the user I would rather they're not allowed to break things.
Could they be treated as hints? Ignore the flag (and warn?) if the used configuration/integrations veto them.
Alternatively, let's remove them from API. Remember "The Jokre" POC was intentionally designed to explore pushing the limits on performance w/o end users having to solve puzzles, such as learning details about these flags and their possible side effects.
So assuming they become either "safe" or internal, maybe you can take advantage of them?
Might be useful for making a POC work, but I believe query will be very likely to be often enabled.
Having an either / or switch for different features in Infinispan will make it harder to use and understand, so I'd rather see work on the right design as taking temporary shortcuts risks baking into stone features which we later struggle to fix or maintain.
+1 to remove "unconditional writes", at least an entry version check should be applied.
I believe we had already pointed out this would eventually happen, pretty much for the reasons you're hitting now.
I agree!
Thanks