anchor.diff:      final state = shouldProcess ? JobState.available : JobState.idle;
       final lockedUntil =
           shouldProcess ? null : DateTime.now().add(_extendDuration);
  -    await _db.withTransaction((tx) async {
  +    await _retryWithTransaction((tx) async {
         final list = await tx.lookup([_db.emptyKey.append(Job, id: id)]);
         final current = list.single as Job;
         if (current != null) {
  
positive.code:         .add(Duration(hours: math.min(errorCount, 168 /* one week */)));
    }
  
    void scheduleOldDataGC() {
      // Run GC in the next 6 hours (randomized wait to reduce race).
      Timer(Duration(minutes: _random.nextInt(360)), () async {
  
negative.code:     }
  
      Future _extend(Job job) async {
        await _retryWithTransaction((tx) async {
          final list = await tx.lookup([job.key]);
          final current = list.single as Job;
          if (current.state == JobState.idle &&
  