Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Under real work load, the on-the-fly instance cleanup functionality dead-locks a lot due to the excessive sub-select statements that depends on index. Some dbms like mysql locks the whole index that are used in the nested select statements.
Split the delete queries into object id selection and deletion on the ids. Since we already batch up instance cleanup by number of instances(default is 10 instances), this is not a problem in scalability with big dataset.