I was able to find the bug, filed: http://code.google.com/p/googleappengine/issues/detail?id=3700
On Sep 7, 9:31 am, John <[email protected]> wrote: > Some more debugging info. > When I get this error, I tried to store a new object UserPhotoTest > (exactly the same, just renamed the class), with the same content, and > it gets persisted properly, in the same request. After the test one > gets persisted correctly - still in the same request - I try again the > regularUserPhoto(creating a new instance, same content), and it > still fails. > This is 100% reproducible. So it seems that this is related to the > servers where this entity is being persisted, which gets this flaky > behavior. Not sure if this is a blobstore or datastore issue. > > On Sep 2, 2:14 pm, "Ikai L (Google)" <[email protected]> wrote: > > > > > > > > > Does this consistently fail every 1/3 times, or at certain times? Not that > > it should matter, but how are you creating the PersistenceManager? > > > On Wed, Sep 1, 2010 at 6:21 PM, John <[email protected]> wrote: > > > This one is for App Engine team. Random silent failures, no > > > explanation. > > > > I have a piece of code which only creates an entity and stores it > > > with > > > > public void makeEntity() { > > >UserPhoto photo = newUserPhoto(...); > > > this.pm.makePersistent(photo); > > > this.pm.close(); > > > assert photo.key != null; // <- fails from time to time > > > > From time to time, the code above will fail. Maybe once every 3 > > > times > > > (with the same parameters). > > > > I am assuming that the store() call at the datastore level is failing > > > for whatever reason, but it is a silent fail as the code does not > > > throw any exception. When this happens I can confirm looking at the > > > datastore viewer that the entity was not persisted. > > > The size does not seem to matter (fails on 5kb as well as 200 kb). > > > > I have logs of the app where back to back requests will fail first > > > and > > > succeeds next, with the exact same payload. > > > > It would be great if the App Engine team can point to an open bug > > > which remotely explains this behavior. > > > > (the problem was present with 1.3.4 already) > > > > The entity model is : > > > @PersistenceCapable(identityType = IdentityType.APPLICATION, > > > detachable = "true") > > > public classUserPhoto{ > > > �...@primarykey > > > �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) > > > Key key; > > > �...@persistent > > > Blob photo; > > > �...@persistent > > > Blob thumbPhoto; > > > �...@persistent > > > private Key user; > > > �...@persistent > > > private int size; > > > �...@persistent > > > private String filename; > > > �...@persistent > > > private Date date; > > > �...@persistent > > > private Boolean canDelete; > > > > I tried persisting the entity with a transaction, and the problem is > > > the same. > > > > This is my jdo-config > > > > <persistence-manager-factory name="transactions-optional"> > > > <property name="javax.jdo.PersistenceManagerFactoryClass" > > > > value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFa > > > ctory"/ > > > > <property name="javax.jdo.option.ConnectionURL" > > > value="appengine"/> > > > <property name="javax.jdo.option.NontransactionalRead" > > > value="true"/> > > > <property name="javax.jdo.option.NontransactionalWrite" > > > value="true"/> > > > <property name="javax.jdo.option.RetainValues" value="true"/> > > > <property name="datanucleus.appengine.autoCreateDatastoreTxns" > > > value="true"/> > > > <property name="datanucleus.DetachOnClose" value="true"/> > > > </persistence-manager-factory> > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Google App Engine for Java" group. > > > To post to this group, send email to > > > [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<google-appengine-java%2B > > > [email protected]> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-appengine-java?hl=en. > > > -- > > Ikai Lan > > Developer Programs Engineer, Google App Engine > > Blog:http://googleappengine.blogspot.com > > Twitter:http://twitter.com/app_engine > > Reddit:http://www.reddit.com/r/appengine -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
