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

Unified Diff: filter/txnBuf/ds_txn.go

Issue 2302743002: Interface update, per-method Contexts. (Closed)
Patch Set: Lightning talk licenses. 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
« no previous file with comments | « filter/txnBuf/doc.go ('k') | filter/txnBuf/race_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: filter/txnBuf/ds_txn.go
diff --git a/filter/txnBuf/ds_txn.go b/filter/txnBuf/ds_txn.go
index 7b25c607d2d4fc2a003d0a2ab8679d94be086929..a91d286ec32fb0a3cd6b6833d8ab446242d30acf 100644
--- a/filter/txnBuf/ds_txn.go
+++ b/filter/txnBuf/ds_txn.go
@@ -116,6 +116,15 @@ func (d *dsTxnBuf) RunInTransaction(cb func(context.Context) error, opts *ds.Tra
return withTxnBuf(d.ic, cb, opts)
}
-func (d *dsTxnBuf) Testable() ds.Testable {
- return d.state.parentDS.Testable()
+func (d *dsTxnBuf) CurrentTransaction() ds.Transaction { return d.state.parentDS.CurrentTransaction() }
+
+func (d *dsTxnBuf) WithoutTransaction() context.Context {
+ c := d.state.parentDS.WithoutTransaction()
+ c = context.WithValue(c, dsTxnBufParent, nil)
+ c = context.WithValue(c, dsTxnBufHaveLock, nil)
+ return c
+}
+
+func (d *dsTxnBuf) GetTestable() ds.Testable {
+ return d.state.parentDS.GetTestable()
}
« no previous file with comments | « filter/txnBuf/doc.go ('k') | filter/txnBuf/race_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698