[ 
https://issues.apache.org/jira/browse/USERGRID-406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jeffrey  updated USERGRID-406:
------------------------------
    Sprint:   (was: Double Check)

> HTTP POST of Entity fails under heavy load
> ------------------------------------------
>
>                 Key: USERGRID-406
>                 URL: https://issues.apache.org/jira/browse/USERGRID-406
>             Project: Usergrid
>          Issue Type: Bug
>            Reporter: David Johnson
>            Priority: Minor
>
> When running UG2 under heavy we sometimes see the exception below when a new 
> Entity is created by an HTTP POST.
> The problem seems to be that we write the Entity. Then when we 
> add-to-collection and validate the Entity, we read the Entity but it is not 
> ready for us to read yet -- so the read fails.
> Instead of re-reading the Entity, we should pass the Entity that we created 
> down into the add-to-collection and validate methods. We should not need to 
> read the Entity in the processing of the request that created it.
> java.lang.NullPointerException
>       at 
> org.apache.usergrid.corepersistence.CpEntityManager.validate(CpEntityManager.java:856)
>       at 
> org.apache.usergrid.corepersistence.CpEntityManager.validate(CpEntityManager.java:842)
>       at 
> org.apache.usergrid.corepersistence.CpEntityManager.getDictionaryAsMap(CpEntityManager.java:1094)
>       at 
> org.apache.usergrid.corepersistence.CpEntityManager.getDictionaryAsSet(CpEntityManager.java:1017)
>       at 
> org.apache.usergrid.services.AbstractService.getConnectingTypesSet(AbstractService.java:505)
>       at 
> org.apache.usergrid.services.AbstractService.importEntity(AbstractService.java:364)
>       at 
> org.apache.usergrid.services.AbstractService.importEntity(AbstractService.java:333)
>       at 
> org.apache.usergrid.services.AbstractCollectionService.postCollection(AbstractCollectionService.java:394)
>       at 
> org.apache.usergrid.services.AbstractService.invokeCollection(AbstractService.java:720)
>       at 
> org.apache.usergrid.services.AbstractService.invoke(AbstractService.java:634)
>       at 
> org.apache.usergrid.services.AbstractService.invoke(AbstractService.java:544)
>       at 
> org.apache.usergrid.services.ServiceRequest.execute(ServiceRequest.java:226)
>       at 
> org.apache.usergrid.services.ServiceRequest.execute(ServiceRequest.java:193)
>       at 
> org.apache.usergrid.rest.applications.ServiceResource.executeServiceRequest(ServiceResource.java:251)
>       at 
> org.apache.usergrid.rest.applications.ServiceResource.executePost(ServiceResource.java:401)
>       at sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       at 
> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to