Hi Dinali, +1 for the 2nd solution.
Since this operation takes a considerable amount of time, it's better to handle this from the DB side during the off-peak hours. Thanks, Thanuja On Fri, Apr 21, 2017 at 11:12 AM, Dinali Dabarera <[email protected]> wrote: > Hi All, > > There is a public issue reported in [3], due to a deadlock happened in > the long-running scenario. > > This deadlock occurs due the time taken by "deleteSTOREOperationsTask" > operation which is responsible for cleaning session data which is scheduled > daily. > > We have currently come up with two solutions for this deadlock problem, > > 1. *We can add a property like " start-time" in the identity.xml > file, In code level we can start the cleanup task during an off-peak time.* > 2. *We can create two stored procedures to handle session data cleanup > tasks and run them as scheduled jobs during the off-peak hours.* > > Here both 1 and 2 have advantages and disadvantages. > > In a cluster scenario, if we implement *1 *one server should > only run this task.. if all of them run at the same time, there is a chance > for deadlock. > If we implement *2, *the clean-up is handled by the data > source itself, without interrupting any IS operations. > > What will be the best solution, out of 1 and 2 for this deadlock scenario? > Please leave your ideas on this. > > [3] https://wso2.org/jira/browse/IDENTITY-5131 > > Thank you.! > > Regards. > > -- > *Dinali Rosemin Dabarera* > Software Engineer > WSO2 Lanka (pvt) Ltd. > Web: http://wso2.com/ > Email : [email protected] > LinkedIn <https://lk.linkedin.com/in/dinalidabarera> > Mobile: +94770198933 <+94%2077%20019%208933> > > > > > <https://lk.linkedin.com/in/dinalidabarera> > > > > > > > > > > > > > > -- *Thanuja Lakmal* Senior Software Engineer WSO2 Inc. http://wso2.com/ *lean.enterprise.middleware* Mobile: +94715979891 +94758009992
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
