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

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: self review 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
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 6ede472503d410fd70248fadbde26e5508e7a5fb..16153321a2671518af85ec5044a9ba0dee2e3117 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 {

Powered by Google App Engine
This is Rietveld 408576698