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

Unified Diff: filter/txnBuf/context.go

Issue 2302743002: Interface update, per-method Contexts. (Closed)
Patch Set: Created 4 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
Index: filter/txnBuf/context.go
diff --git a/filter/txnBuf/context.go b/filter/txnBuf/context.go
index 63e1cace82b81b63833ffe9208bca19b031892d7..b044328820e4a32b1c987f72c0e554b63831e732 100644
--- a/filter/txnBuf/context.go
+++ b/filter/txnBuf/context.go
@@ -45,17 +45,3 @@ func memoryCorruption(err error) {
panic(err)
}
}
-
-// GetNoTxn allows you to to escape the buffered transaction (if any), and get
-// a non-transactional handle to the datastore. This does not invalidate the
-// currently-buffered transaction, but it also does not see any effects of it.
-//
-// TODO(iannucci): This is messy, but mostly because the way that transactions
-// work is messy. Fixing luci/gae#issues/23 would help though, because it means
-// we could make transactionality recorded by a single index in the context
-// instead of relying on function nesting.
-func GetNoTxn(c context.Context) ds.Interface {
iannucci 2016/09/16 01:01:13 it's important that escaping the transaction via `
dnj 2016/09/16 05:44:42 I remember thinking about this, and for some reaso
- c = context.WithValue(c, dsTxnBufParent, nil)
- c = context.WithValue(c, dsTxnBufHaveLock, nil)
- return ds.GetNoTxn(c)
-}

Powered by Google App Engine
This is Rietveld 408576698