Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(989)

Unified Diff: service/datastore/testable.go

Issue 1335083002: Add emulation of transaction retries to memory impl of RunInTransaction. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: add Testable() to non-Raw interfaces Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « service/datastore/interface.go ('k') | service/taskqueue/interface.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/testable.go
diff --git a/service/datastore/testable.go b/service/datastore/testable.go
index 5887595f742b02b755476f2cddec4c73793d5cbe..14648dc124b5c0997f18f424765888e4fc6d7a6e 100644
--- a/service/datastore/testable.go
+++ b/service/datastore/testable.go
@@ -33,4 +33,9 @@ type Testable interface {
// But depending on the implementation it may implemented with an atomic
// operation.
CatchupIndexes()
+
+ // SetTransactionRetryCount set how many times RunInTransaction will retry
+ // transaction body pretending transaction conflicts happens. 0 (default)
+ // means commit succeeds on the first attempt (no retries).
+ SetTransactionRetryCount(int)
}
« no previous file with comments | « service/datastore/interface.go ('k') | service/taskqueue/interface.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698