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

Unified Diff: appengine/cmd/dm/mutate/record_completion.go

Issue 1537883002: Initial distributor implementation (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: fix imports and make dummy.go a real file Created 4 years, 6 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 | « appengine/cmd/dm/mutate/merge_quest_test.go ('k') | appengine/cmd/dm/mutate/record_completion_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/cmd/dm/mutate/record_completion.go
diff --git a/appengine/cmd/dm/mutate/record_completion.go b/appengine/cmd/dm/mutate/record_completion.go
index e3d07b37b58a24da7a2b6fcad41ae8067cedc73d..611cdb53f50831a92a951910454a701dcb176ff2 100644
--- a/appengine/cmd/dm/mutate/record_completion.go
+++ b/appengine/cmd/dm/mutate/record_completion.go
@@ -21,10 +21,10 @@ const completionLimit = 64
// for each incoming dependency that is blocked.
//
// In the case where an Attempt has hundreds or thousands of incoming
-// dependencies, the naieve implementation of this mutation could easily
-// overfill a single datastore transaction. For that reason, the implementation
-// here unblocks things 64 edges at a time, and keeps returning itself as a
-// mutation until it unblocks less than 64 things (e.g. it does a tail-call).
+// dependencies, the naive implementation of this mutation could easily overfill
+// a single datastore transaction. For that reason, the implementation here
+// unblocks things 64 edges at a time, and keeps returning itself as a mutation
+// until it unblocks less than 64 things (e.g. it does a tail-call).
//
// This relies on tumble's tail-call optimization to be performant in terms of
// the number of transactions, otherwise this would take 1 transaction per
@@ -33,7 +33,7 @@ const completionLimit = 64
// other Attempts to take dependencies on this Attempt while RecordCompletion
// is in between tail-calls).
type RecordCompletion struct {
- For *dm.Attempt_ID `datastore:",noindex"`
+ For *dm.Attempt_ID
}
// Root implements tumble.Mutation.
@@ -66,10 +66,7 @@ func (r *RecordCompletion) RollForward(c context.Context) (muts []tumble.Mutatio
for i, bdep := range needProp {
bdep.Propagated = true
- muts[i] = &AckFwdDep{
- Dep: bdep.Edge(),
- DepIsFinished: true,
- }
+ muts[i] = &AckFwdDep{bdep.Edge()}
}
if len(needProp) == completionLimit {
« no previous file with comments | « appengine/cmd/dm/mutate/merge_quest_test.go ('k') | appengine/cmd/dm/mutate/record_completion_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698