Hi Thilini,

It seems that you are not deleting App asset instances properly. Instead of
that, you guys are deleting parent collection of the App asset. So before
"artifactManager.removeGenericArtifact(artifactId);"[1] operation, you have
to delete the App asset using below code snippet :
artifactManager.removeGenericArtifact(appArtifact);

[1].
https://github.com/wso2/carbon-appmgt/blob/master/components/org.wso2.carbon.appmgt.impl/src/main/java/org/wso2/carbon/appmgt/impl/APIProviderImpl.java#L1963

Regards,
Chandana

On Wed, May 25, 2016 at 3:23 PM, Thilini Shanika <[email protected]> wrote:

> Hi all,
>
> In App Manager, we have encountered the issue [1] while we were deleting
> one or more webapps from the publishers app listing page. Basically, when
> we delete an app or multiple apps, one or more applications disappeared
> from app listing page, but those apps are still available in Carbon
> console. We have debugged the artifact retrieving flow in of
> carbon-appm, carbon-governance and carbon-registry and below is what
> happens during this.
>
> - App Publisher retrieves the available app artifacts through
> GeneticArtifactManager's findGenericArtifacts(Query Map)  and
> set PaginationContext count to be the length of total applications
> available in registry.
> - Applications are deleted from App Publisher through
> GeneticArtifactManager's removeGenericArtifact(id) method
> - Even though an application registry artifact is deleted, app deletion is
> not getting reflected to indexing and during app retrieval, we have noticed
> that the SolrDocument of the deleted App is still available in
> SolrDocumentList retrieved from registry artifact search.
>
> Due to this behavior, some of the already available apps are dropped from
> paginated artifacts list since some non-existing artifacts are included in
> search result set. But when the registry in reindexed, all the available
> applications become visible in App Publisher.
>
> Any insight on this is highly appreciated
>
> Thanks
> Thilini
>
> [1] - https://wso2.org/jira/browse/APPM-1412
>
>
>
> --
> Thilini Shanika
> Software Engineer
> WSO2, Inc.; http://wso2.com
> 20, Palmgrove Avenue, Colombo 3
>
> E-mail: [email protected]
>
>


-- 
*Chandana Napagoda*
Senior Software Engineer
WSO2 Inc. - http://wso2.org

*Email  :  [email protected] <[email protected]>**Mobile : +94718169299*

*Blog  :    http://cnapagoda.blogspot.com <http://cnapagoda.blogspot.com>*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to