Hide Forgot
Created attachment 1215109 [details] testcase Description of problem: I've a "graph" of entities that I'm loading (4 entity types with associations between them) starting with a simple (cacheable) query at the root of the graph then "navigation" of the associations from the graph "root". I repeat the exact logic 4 times (four separate transactions) and encounter unexpected queries the second and third times. Version-Release number of selected component (if applicable): How reproducible: Consistently Steps to Reproduce: See attached testcase Actual results: The 1st time I load the graph, I see queries to load the graph from the database. The 2nd time I see a *different* set of queries to the database. The 3rd time, I see a single query (different from the 1st and 2nd times). Finally, on the 4th try (and on each subsequent try of the same logic) I see *no* queries. Expected results: There should be database queries *only* on the 1st "loop" when loading the graph. Every subsequent loop should resolve all entities and associations in the level 2 cache. Additional info: The fact that 4th (and all subsequent attempts) work without any database queries suggests that the 2nd and 3rd loops exhibit a defect.
Note that the issue is *not* reproducible with EAP 7.0.z Note also, I am not certain if the issue is within Infinispan or Hibernate or if it spans the two components. I do not have a pure Infinispan test for the issue. The test requires Hibernate + Infinispan + EAP.
This actually does appear to be a bug. As Radim says, fixing it may cause other problems. Closing as WONTFIX.