Got it. Thanks Harsha for the clarification Thanks & Regards, Mushthaq
On Sat, Nov 18, 2017 at 9:50 PM, Harsha Kumara <[email protected]> wrote: > > > On Sat, Nov 18, 2017 at 9:32 PM, Mushthaq Rumy <[email protected]> wrote: > >> @Harsha - Thanks for the input. I have one more doubt. Why would a high >> frequency of API creation cause errors? Since APIM should be able to handle >> multiple create requests in parallel, it should not be a problem right? >> Please correct me if I'm wrong. >> > "We ourselves have observed the registry deadlocks when testing the > product for API creation/publishing under high concurrency and high > speed. An API creation causes registry writes and APIM DB writes as well. > Which together causes a number of SQL inserts into the DBs. And on top of > this we use registry transactions as well. So basically an API > creation/publishing > is a heavy operation in terms of DB writes. So we cannot expect high > response times for this anyway." Extracted by NuwanD's reply. > >> However, I ran only that particular test case after removing that line >> and it seems to be working fine. I will run the whole test integration >> module and verify. >> >> Thanks & Regards, >> Mushthaq >> >> On Sat, Nov 18, 2017 at 7:11 PM, Harsha Kumara <[email protected]> wrote: >> >>> >>> >>> On Sat, Nov 18, 2017 at 6:50 PM, Prasanna Dangalla <[email protected]> >>> wrote: >>> >>>> HI Rumy, >>>> >>>> In this code, it creates the API and then does a getAPI call as well. >>>> Then changing the lifecycle state as well. After changing the lifecycle >>>> state is does a verification as well. After all these only this >>>> Thread.sleep is done. Hence IMO we can remove this Thread.sleep. >>>> >>> Yes we should be able to remove it. I believe this isn't going with a >>> path which uses indexed API to retrived. But sometimes we noticed calling >>> the API creation APIs in high frequency can cause errors. So it's better to >>> do a few test rounds after you remove it and confirm. My doubt is, there >>> might be a reason for those delays. It mostly the calling frequency. Anyway >>> let's check and verify. >>> >>>> >>>> Thanks >>>> Prasanna >>>> >>>> *Prasanna Dangalla* >>>> Senior Software Engineer, WSO2, Inc.; http://wso2.com/ >>>> lean.enterprise.middleware >>>> >>>> >>>> *cell: +94 718 11 27 51* >>>> *twitter: @prasa77* >>>> >>>> On Sat, Nov 18, 2017 at 1:36 PM, Mushthaq Rumy <[email protected]> >>>> wrote: >>>> >>>>> Hi All, >>>>> >>>>> While optimizing the APIM product build, I found a Thread.sleep() at >>>>> [1]. Any particular reason for adding this. IMO we would not be needing >>>>> this since this does not wait for any response rather it just waits before >>>>> creating the next API. If there is no such specific reason, shall we >>>>> remove >>>>> this? WDYT? >>>>> >>>>> [1] - https://github.com/mushthaq33/product-apim/blob/468ab801a411 >>>>> 2d40c3a7bbddfcb7db21eae5a998/modules/integration/tests-integ >>>>> ration/tests-backend/src/test/java/org/wso2/am/integration/t >>>>> ests/other/APIM710AllSubscriptionsByApplicationTestCase.java#L165 >>>>> >>>>> -- >>>>> Mushthaq Rumy >>>>> *Software Engineer* >>>>> Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194> >>>>> Email : [email protected] >>>>> WSO2, Inc.; http://wso2.com/ >>>>> lean . enterprise . middleware. >>>>> >>>>> <http://wso2.com/signature> >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> [email protected] >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> Harsha Kumara >>> Software Engineer, WSO2 Inc. >>> Mobile: +94775505618 <+94%2077%20550%205618> >>> Blog:harshcreationz.blogspot.com >>> >>> _______________________________________________ >>> Dev mailing list >>> [email protected] >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Mushthaq Rumy >> *Software Engineer* >> Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194> >> Email : [email protected] >> WSO2, Inc.; http://wso2.com/ >> lean . enterprise . middleware. >> >> <http://wso2.com/signature> >> > > > > -- > Harsha Kumara > Software Engineer, WSO2 Inc. > Mobile: +94775505618 <+94%2077%20550%205618> > Blog:harshcreationz.blogspot.com > -- Mushthaq Rumy *Software Engineer* Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194> Email : [email protected] WSO2, Inc.; http://wso2.com/ lean . enterprise . middleware. <http://wso2.com/signature>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
