[go-nuts] Re: datastore.RunInTransaction

2020-12-27 Thread Jeff
Thanks. I see now that if err == nil in the following code snippet, then the for loop will end. Not sure why I find the effect of this err check confusing, but I do. Probably its dual-use is the culprit. Return on happy path (i.e., err == nil) and return on most errors. if cmt, err := tx.Co

[go-nuts] Re: datastore.RunInTransaction

2020-12-27 Thread peterGo
Jeff, Retry if err == ErrConcurrentTransaction. Peter On Saturday, December 26, 2020 at 10:54:36 PM UTC-5 Jeff wrote: > I was curious how datastore.RunInTransaction was implemented in comparison > to the Transaction method set so I took quick look at the source code. > However, I hope I am s