I think you are mistaken about ConcurrentModificationException meaning it will eventually commit.
If you get a ConcurrentModificationException, then that means the entity *failed* to write (because another write has modified the update timestamp on that entity group). You must catch that exception and try to write again (unless you don't want to overwrite). You can see this behavior first hand here: http://gaetestjig.appspot.com/ and click on the "Unique Constraint" tab. Click the "Advance Alice" button four times, and click the "Advance Bobby" button four times (in any order). Now click on either button a fifth time and it will write the entity to the data store, and clicking the other button will experience a ConcurrentModificationException. Broc On Dec 13, 5:48 pm, coltsith <[email protected]> wrote: > I recently got a ConcurrentModificationException, and the > documentation states that this will be "committed and eventually will > be applied successfully." However I got to thinking of a possible > outcome: > > Request A modifies entity > Request B modifies entity and receives ConcurrentModificationException > D > Request E modifies entity > ConcurrentModificationException D commits and is applied, which > overwrites Request E's work. > > Can this happen? Or does Request E get its own > ConcurrentModificationException since (D) hasn't been committed yet? > > Many thanks -- 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.
