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

Side by Side Diff: tumble/process.go

Issue 2592753002: Create unbuffered Tumble entry point for LogDog. (Closed)
Patch Set: Remove unrelated change. Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The LUCI Authors. All rights reserved. 1 // Copyright 2015 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package tumble 5 package tumble
6 6
7 import ( 7 import (
8 "bytes" 8 "bytes"
9 "fmt" 9 "fmt"
10 "math" 10 "math"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 deletedMuts = 0 350 deletedMuts = 0
351 processedMuts = 0 351 processedMuts = 0
352 352
353 iterMuts := muts 353 iterMuts := muts
354 iterMutKeys := mutKeys 354 iterMutKeys := mutKeys
355 355
356 for i := 0; i < len(iterMuts); i++ { 356 for i := 0; i < len(iterMuts); i++ {
357 m := iterMuts[i] 357 m := iterMuts[i]
358 358
359 logging.Fields{"m": m}.Infof(c, "running RollForward") 359 logging.Fields{"m": m}.Infof(c, "running RollForward")
360 » » » shards, newMuts, newMutKeys, err := enterTransactionInte rnal(c, cfg, overrideRoot{m, root}, uint64(i)) 360 » » » shards, newMuts, newMutKeys, err := enterTransactionMuta tion(c, cfg, overrideRoot{m, root}, uint64(i))
361 if err != nil { 361 if err != nil {
362 l.Errorf("Executing decoded gob(%T) failed: %q: %+v", m, err, m) 362 l.Errorf("Executing decoded gob(%T) failed: %q: %+v", m, err, m)
363 continue 363 continue
364 } 364 }
365 processedMuts++ 365 processedMuts++
366 for j, nm := range newMuts { 366 for j, nm := range newMuts {
367 if nm.Root(c).HasAncestor(root) { 367 if nm.Root(c).HasAncestor(root) {
368 runNow := !cfg.DelayedMutations 368 runNow := !cfg.DelayedMutations
369 if !runNow { 369 if !runNow {
370 dm, isDelayedMutation := nm.(Del ayedMutation) 370 dm, isDelayedMutation := nm.(Del ayedMutation)
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 for _, k := range toDel { 412 for _, k := range toDel {
413 banSet.Add(k.Encode()) 413 banSet.Add(k.Encode())
414 } 414 }
415 if err := ds.Delete(c, toDel); err != nil { 415 if err := ds.Delete(c, toDel); err != nil {
416 l.Warningf("error deleting finished mutations: %s", err) 416 l.Warningf("error deleting finished mutations: %s", err)
417 } 417 }
418 } 418 }
419 419
420 return nil 420 return nil
421 } 421 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698