Previously:
- TaskResult.abandoned_ts is set when a task is EXPIRED, BOT_DIED, KILLED. Same for abandon_time.
- TaskResult.completed_ts is set in other cases. Same for end_time.
- Because of the two point above, ordering TaskSort accepts a ABANDONED_TS value.
Refs:
https://cs.chromium.org/chromium/infra/luci/appengine/swarming/swarming_rpcs.py
https://cs.chromium.org/chromium/infra/luci/appengine/swarming/proto/api/swarming.proto
Change:
1. Always set completed_ts in the DB.
2. Remove TaskSort.ABANDONED_TS. It wasn't much used anyway.
3. Update the internal code to stop caring about abandoned_ts. This is particularly important for scanning performance of issue 765435.
4. (later) Start setting abandoned_ts with its new meaning, which is to determine when the task was abandoned, either due to a timeout, or a kill request by a client. This requires a bot API change.