Hi, On Mon, Oct 1, 2012 at 3:57 PM, Dileepa Jayakody <[email protected]> wrote:
> Hi Rajika and all, > > This issue with adding a p2-repo getting stuck is reproduced in AS 5.0. > The issue is not there in kernel, esb-4.5.0 etc. Another thing to note is > although the ui thread gets stuck, if we restart AS after a sufficient time > for a repo-add or feature installation request, we can see the request has > been fulfilled from the feature manager BE after the restart. > I too observed this in AS. The installation task/ repo adding task completion notifications doesn't appear. thanks, > > This could be an issue with CallBackHandlers for feature manager requests. > But what I cannot understand is why is it only happening in AS, because > feature-manager component is common to all products. > Any ideas? > > Thanks, > Dileepa > > On Mon, Sep 10, 2012 at 9:06 PM, Chethiya Abeysinghe <[email protected]>wrote: > >> OK. Got it. We can reason out loading meta data of all the features to >> the memory for computing the dependency tree. But I don't think that needs >> feature artifacts to be loaded into memory too. >> I guess how it works is, first it hash all features in memory and then >> create dependency tree for the user selected features efficiently f >> >>> Yes Chethiya p2 computes the dependencies before installing features. It >>> is called a provisioning plan. >>> >>> But Rajika's concern is that it's taking a long time at repository >>> adding stage, which should not be performing any dependency computations. >>> But I suspect p2 might be loading all the features in the repo to memory at >>> this stage. Have to clarify with p2-dev. >>> >>> Thanks, >>> Dileepa >>> >>> On Mon, Sep 10, 2012 at 5:47 PM, Chethiya Abeysinghe >>> <[email protected]>wrote: >>> >>>> AFAIK, installing a p2 feature means not just copying set of files. It >>>> computes required dependency trees too. Looking at the content.xml I think >>>> it can take sometime for computation. But always better to check with >>>> p2-dev as there can be cases which can be configured to >>>> avoid unnecessary dependency checks. >>>> >>>> - Chethiya >>>> >>>> On Mon, Sep 10, 2012 at 4:37 PM, Dileepa Jayakody <[email protected]>wrote: >>>> >>>>> Hi Rajika, >>>>> >>>>> Thanks for the pointers. >>>>> In the feature-manager we are using p2 sdk, calling the p2-api under >>>>> the hood. >>>>> >>>>> For eg: to add and load a repository following code is used by us. >>>>> >>>>> IMetadataRepositoryManager metadataRepositoryManager = >>>>> ServiceHolder.getMetadataRepositoryManager(); >>>>> IArtifactRepositoryManager artifactRepositoryManager = >>>>> ServiceHolder.getArtifactRepositoryManager(); >>>>> >>>>> //adding metadata and artifact repositories >>>>> metadataRepositoryManager.addRepository(location); >>>>> artifactRepositoryManager.addRepository(location); >>>>> //Loading the metadata repository >>>>> metadataRepositoryManager.loadRepository(location, new >>>>> NullProgressMonitor()); >>>>> metadataRepositoryManager.setRepositoryProperty(location, >>>>> IRepository.PROP_NICKNAME, nickName); >>>>> >>>>> //Loading the artifact repository >>>>> artifactRepositoryManager.loadRepository(location, new >>>>> NullProgressMonitor()); >>>>> artifactRepositoryManager.setRepositoryProperty(location, >>>>> IRepository.PROP_NICKNAME, nickName); >>>>> >>>>> First we need to clarify how p2-works under the hood when loading a >>>>> repository from a given location. >>>>> Ideally it should just index the feature list by reading the the >>>>> repository's content.xml and artifacts.xml at this point without loading >>>>> all the features to the memory ( I believe this is what you are also >>>>> suggesting). >>>>> I will discuss this with p2-dev also and see how we can improve our >>>>> feature manager based on that. >>>>> >>>>> Thanks, >>>>> Dileepa >>>>> >>>>> >>>>> On Mon, Sep 10, 2012 at 4:12 PM, Rajika Kumarasiri <[email protected]>wrote: >>>>> >>>>>> I meant the consumer task should do the feature installation >>>>>> asynchronously. >>>>>> >>>>>> Rajika >>>>>> >>>>>> >>>>>> On Mon, Sep 10, 2012 at 3:54 PM, Rajika Kumarasiri >>>>>> <[email protected]>wrote: >>>>>> >>>>>>> If you have not done already, here how it should be done. >>>>>>> >>>>>>> There should be an instance of blocking queue instance which keeps >>>>>>> track of requested features to install. There should be a producer task >>>>>>> which drop next requested feature list to install into the blocking >>>>>>> queue. >>>>>>> There should be a consumer task will remove items from the blocking >>>>>>> queue. >>>>>>> For producing and consuming use >>>>>>> http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/BlockingQueue.html#put<http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/BlockingQueue.html#put%28E%29> >>>>>>> and >>>>>>> http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/BlockingQueue.html#take() >>>>>>> so >>>>>>> that your consumer and producer task will not kill the CPU. >>>>>>> >>>>>>> Since Feature manager will not use frequently this model may not >>>>>>> make sense much, but I think it will be useful when our p2 feature >>>>>>> repository starts to grow. >>>>>>> >>>>>>> Hope this helps. >>>>>>> >>>>>>> Rajika >>>>>>> >>>>>>> On Mon, Sep 10, 2012 at 2:47 PM, Dileepa Jayakody >>>>>>> <[email protected]>wrote: >>>>>>> >>>>>>>> Hi Rajika, >>>>>>>> >>>>>>>> Is the repository you are adding a local-repository or a remote >>>>>>>> repository? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Dileepa >>>>>>>> >>>>>>>> On Mon, Sep 10, 2012 at 2:44 PM, Rajika Kumarasiri <[email protected] >>>>>>>> > wrote: >>>>>>>> >>>>>>>>> I just tried to add the feature repository of 4.0.1 into a AS >>>>>>>>> (built from 4.0.1 branch) and it seems it just take too much time. >>>>>>>>> >>>>>>>>> I still can see the message "Adding repository.." and it just >>>>>>>>> there. >>>>>>>>> >>>>>>>>> This need to improve. We just need to load the list features (just >>>>>>>>> names) and install any selected features asynchronously. >>>>>>>>> >>>>>>>>> It seems this loads the whole features into memory. >>>>>>>>> >>>>>>>>> Rajika >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Dev mailing list >>>>>>>>> [email protected] >>>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Dileepa Jayakody, >>>>>>>> Software Engineer, WSO2 Inc. >>>>>>>> Lean . Enterprise . Middleware >>>>>>>> >>>>>>>> Mobile : +94777-857616 >>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Dileepa Jayakody, >>>>> Software Engineer, WSO2 Inc. >>>>> Lean . Enterprise . Middleware >>>>> >>>>> Mobile : +94777-857616 >>>>> >>>>> >>>>> _______________________________________________ >>>>> Dev mailing list >>>>> [email protected] >>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>> >>>>> >>>> >>>> >>>> -- >>>> Chethiya Abeysinghe >>>> Software Engineer; WSO2, Inc.; http://wso2.com/ >>>> email: [email protected] phone: +94 777444891 >>>> blog: chethiya3000.blogspot.com >>>> >>>> >>>> >>> >>> >>> -- >>> Dileepa Jayakody, >>> Software Engineer, WSO2 Inc. >>> Lean . Enterprise . Middleware >>> >>> Mobile : +94777-857616 >>> >>> > > > -- > Dileepa Jayakody, > Software Engineer, WSO2 Inc. > Lean . Enterprise . Middleware > > Mobile : +94777-857616 > > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Supun Malinga, Software Engineer, WSO2 Inc. http://wso2.com http://wso2.org email - [email protected] <[email protected]> mobile - 071 56 91 321
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
