What you are explaining sounds exactly like what would happen if your overwriting a new entity with an older entity.
First, you might want to make game_id the key name or id. That way you can fetch by key inside a transaction. Second, you might want to use your move_count property to ignore stale updates. So if, inside your transaction, you find move_count is greater than whatever you expected you can ignore that update. Robert On Thu, Apr 21, 2011 at 16:47, SkyMountain <tantian...@gmail.com> wrote: > hi, every body. > I built an app on GAE, which run about a year now. But for months, I > found a strange phenomenon: the entity in the datastore, will > flashback several times a day. > > Let me tell you the detail. It's a website for Go game, I use an > entity to save the game record. Every time, when user play a move, the > entity will be update once. My entity is designed as below: > > class T_Game(db.Model): > game_id = db.IntegerProperty() > move_count = db.IntegerProperty() > record = db.TextProperty() > > when user play a move, the function just like below: > > def play(gameid, pos): > game = FindGame(id) > game.record += pos > move_count += 1 > game.put() > > So you see, with the game going on, the move_count will increase, and > record will get longer and longer. > > Now you understand my amazing: I found that the record will get shorer > sometime! > When the record get shorter, the move_count will decrease at the same > time! > When it happened, I don't find any log about it. It happened > automatically at google backend. > It may happens in several active entities at the same time; and will > happened several times a day, or several day a time, their are no > regular. > > Is that anyone hit in the same problem like me? It a strange > experience to my user, can anybody tell me how to fix it or avoid it? > > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to google-appengine@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.