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

Unified Diff: filter/txnBuf/doc.go

Issue 1434873003: Fix races in txnBuf (Closed) Base URL: https://github.com/luci/gae.git@race_tests
Patch Set: fix stuff Created 5 years, 1 month 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/context.go ('k') | filter/txnBuf/ds.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: filter/txnBuf/doc.go
diff --git a/filter/txnBuf/doc.go b/filter/txnBuf/doc.go
index b9cb7f06f4f84d00c82e74acb10363672c935f4d..63d0c9b8a5f8f6f03e814b58e83a6802320bb7bf 100644
--- a/filter/txnBuf/doc.go
+++ b/filter/txnBuf/doc.go
@@ -57,8 +57,18 @@
// viable outside the transaction as well as inside of it while also having
// it accurately reflect the 'merged' query results.
//
-// - No parallel access to datastore while in a transaction; all nested
-// transactions are serialized. This is done for simplicity and correctness.
+// - No parallel access* to datastore while in a transaction; all nested
+// operations are serialized. This is done for simplicity and correctness.
+//
+// * The exception is that callbacks inside of
+// a Run/GetMulti/DeleteMulti/PutMulti query MAY read/write the current
+// transaction. Modifications to the datastore during query executions will
+// not affect the query results (e.g. the query has snapshot consistency
+// from the moment that it begins iteration). Note, however, that datastore
+// operations within the callback are still synchronized. This behavior is
+// so that the user is not forced to buffer all of the query results before
+// doing work with them, but can treat the query like a stream of events,
+// if they so choose.
//
// - The changing of namespace inside of a transaction is undefined... This is
// just generally a terrible idea anyway, but I thought it was worth
« no previous file with comments | « filter/txnBuf/context.go ('k') | filter/txnBuf/ds.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698