Hi,
We are experiencing an issue in our application that only occurs under load - we sometimes fail to read entities from the database.
I've isolated this issue to a fairly simple test case (please see attached eclipse project). I have some test entities listed below. When I run a load test that creates, reads and updates these entities in multithreaded application it sometimes fails to read them from the DB with "No matching results for a unique query" error. The error occurs in 2-3% of iterations. When I run the same test in a single thread it is 100% successful.
I'm using version 2.3.7.
Test entities:
@Entity @Inheritance(strategy=InheritanceType.TABLE_PER_CLASS) @TableGenerator(name="TestIdTableGen", initialValue=0, allocationSize=50) public class TestIdHolder implements Serializable{ private static final long serialVersionUID = 1L; private long version; private long longId; @Id @GeneratedValue(strategy=GenerationType.TABLE, generator="TestIdTableGen") public long getLongId() { return longId; } public void setLongId(long longId) { this.longId = longId; } @Version public long getVersion() { return version; } } @Entity @Indices({ @Index(members={"oidId", "type"}), @Index(members={"parentAcl"}) }) public class TestEntity extends TestIdHolder { private static final long serialVersionUID = 6249921651146397564L; @OneToOne(cascade=CascadeType.REFRESH, fetch=FetchType.EAGER) private TestEntity parentAcl; @Basic private boolean entriesInheriting = true; private long oidId; private String type; ............................
Kind regards,
Natalia Levine.