On Mon, Apr 24, 2017 at 3:40 PM, Thanuja Jayasinghe <[email protected]> wrote:
> Hi Ruwan, > > On Mon, Apr 24, 2017 at 2:32 PM, Ruwan Abeykoon <[email protected]> wrote: > >> Hi Dinali, >> Do we know any figures for >> >> time taken by "deleteSTOREOperationsTask" operation >> >> We need to measure how long it takes to complete the data deletion per X >> number of records. Only then we could arrive at a correct strategy. >> > +1 > >> Having stored-procedure or handling it on queries does not make much >> difference. >> I would vote for changing the cleanup task schedule and making the delete >> query optimizations. >> > > When we handle it this way we have to figure out following things, > > - Only one server in the cluster should run this operation. If two nodes > run this operation at the same time there is a possibility for deadlock. > - Then if that node is down for some reason, one of the other nodes must > run this as this tables get huge number of entries each day > - Need to provide a way to configure the time which this operation need to > run. Do we need to configure this in every node? (Only one node will run > this operation) > Need to have a coordinated ntask with input provided as a cron expression. Better we discuss this with Anjana/DataTeam and find out if there are any caveats in this approach and then decide. Because I don't want to put effort and then find problems in customer's production environment. We could be better off writing stored procedures for all database types. But no harm trying this. Regards, Johann. > > Having stored procedures to handle this, does not have above complexities. > > >> Cheers, >> Ruwan >> >> On Mon, Apr 24, 2017 at 2:17 PM, Thanuja Jayasinghe <[email protected]> >> wrote: >> >>> 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 >>> >> >> >> >> -- >> >> *Ruwan Abeykoon* >> *Associate Director/Architect**,* >> *WSO2, Inc. http://wso2.com <https://wso2.com/signature> * >> *lean.enterprise.middleware.* >> >> > > Thanks, > Thanuja > -- > *Thanuja Lakmal* > Senior Software Engineer > WSO2 Inc. http://wso2.com/ > *lean.enterprise.middleware* > Mobile: +94715979891 +94758009992 > -- Thanks & Regards, *Johann Dilantha Nallathamby* Technical Lead & Product Lead of WSO2 Identity Server Governance Technologies Team WSO2, Inc. lean.enterprise.middleware Mobile - *+94777776950* Blog - *http://nallaa.wordpress.com <http://nallaa.wordpress.com>*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
