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

Unified Diff: impl/memory/taskqueue_data.go

Issue 1302813003: impl/memory: Implement Queries (Closed) Base URL: https://github.com/luci/gae.git@add_multi_iterator
Patch Set: remove limit double-set restriction Created 5 years, 4 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: impl/memory/taskqueue_data.go
diff --git a/impl/memory/taskqueue_data.go b/impl/memory/taskqueue_data.go
index 4bc24a1a7436a074e6b3071393818ef83146b426..25d1db682b45d579dd282d3fdbe3d88fd676bdc0 100644
--- a/impl/memory/taskqueue_data.go
+++ b/impl/memory/taskqueue_data.go
@@ -196,9 +196,14 @@ var _ interface {
tq.Testable
} = (*txnTaskQueueData)(nil)
-func (t *txnTaskQueueData) canApplyTxn(obj memContextObj) bool { return false }
-func (t *txnTaskQueueData) applyTxn(context.Context, memContextObj) { panic("impossible") }
-func (t *txnTaskQueueData) mkTxn(*ds.TransactionOptions) memContextObj { panic("impossible") }
+func (t *txnTaskQueueData) canApplyTxn(obj memContextObj) bool { return false }
+func (t *txnTaskQueueData) applyTxn(context.Context, memContextObj) {
+ impossible(fmt.Errorf("cannot apply nested transaction"))
+}
+func (t *txnTaskQueueData) mkTxn(*ds.TransactionOptions) memContextObj {
+ impossible(fmt.Errorf("cannot start nested transaction"))
+ return nil
+}
func (t *txnTaskQueueData) endTxn() {
if atomic.LoadInt32(&t.closed) == 1 {

Powered by Google App Engine
This is Rietveld 408576698