mesos-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sargun Dhillon <sar...@sargun.me>
Subject Reusing Task IDs
Date Fri, 10 Jul 2015 17:06:45 GMT
Is reusing Task IDs good behaviour? Let's say that I have some
singleton task - I'll call it a monitoring service. It's always going
to be the same process, doing the same thing, and there will only ever
be one around (per instance of a framework). Reading the protobuf doc,
I learned this:


/**
 * A framework generated ID to distinguish a task. The ID must remain
 * unique while the task is active. However, a framework can reuse an
 * ID _only_ if a previous task with the same ID has reached a
 * terminal state (e.g., TASK_FINISHED, TASK_LOST, TASK_KILLED, etc.).
 */
message TaskID {
  required string value = 1;
}
---
Which makes me think that it's reasonable to just give this task the
same taskID, and that every time I bring it from a terminal status to
running once more, I can reuse the same ID. This also gives me the
benefit of being able to more easily locate the task for a given
framework, and I'm able to exploit Mesos for some weak guarantees
saying there wont be multiple of these running (don't worry, they lock
in Zookeeper, and concurrent runs don't do anything, they just fail).

Opinions?

Mime
View raw message