code: func (op *triageOp) finalize(c context.Context, success bool) {
  	// Cleanup the garbage accumulated in the transaction only if the transaction
  	// really landed. If it didn't this it not really a garbage!
  	if success && len(op.garbage) != 0 {
  		op.debugInfoLog(c, "Cleaning up storage of %d dsset items", len(op.garbage))
  		if err := dsset.CleanupGarbage(c, op.garbage); err != nil {
  			op.debugErrLog(c, err, "Best effort cleanup failed")
  		}
  	}
  	op.debugInfoLog(c, "Done")
  
  	// Save the log. There's nothing we can do if this fails, but we try to detect
  	// and warn on the log staleness (see GetJobTriageLog implementation).
  	if op.lastTriage.IsZero() {
  		op.lastTriage = clock.Now(c).UTC()
  	}
  	log := JobTriageLog{
  		JobID:      op.jobID,
  		LastTriage: op.lastTriage,
  		DebugLog:   op.debugLog.String(),
  	}
  	if err := datastore.Put(c, &log); err != nil {
  		logging.WithError(err).Errorf(c, "Failed to store the triage debug log")
  	}
  }
docs: // finalize is called after the transaction (successfully submitted or not) to
  // delete any produced garbage, submit the triage log, update monitoring
  // counters, etc.
  //
  // 'success' is true if the transaction successfully landed.
  //
  // It is best effort. We can't do anything meaningful if it fails: the
  // transaction has already landed, there's no way to unland it.