I have a piece of code which only creates an entity and stores it with
public void makeEntity() {
UserPhoto photo = new UserPhoto(...);
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 10 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 class UserPhoto {
@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;
--
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.