[orchestrator/task reaper] Clean up tasks in dirty list for which the service has been deleted#2666
Conversation
|
LGTM. |
Codecov Report
@@ Coverage Diff @@
## master #2666 +/- ##
==========================================
+ Coverage 62.06% 62.23% +0.16%
==========================================
Files 134 134
Lines 21739 21740 +1
==========================================
+ Hits 13492 13529 +37
+ Misses 6803 6771 -32
+ Partials 1444 1440 -4 |
| if service == nil { | ||
| // If the service can't be found, assume that it was deleted | ||
| // and remove the task from the dirty list. | ||
| delete(tr.dirty, dirty) |
There was a problem hiding this comment.
Should this be moved to cleanup instead of just being deleted from dirty, otherwise they'll never be removed from the store until the next leader election?
There was a problem hiding this comment.
Negative. the dirty map is orchestrator.SlotTuple objects, which represent a service and a node or slot, not an individual task. The task itself should be in the cleanup list already.
There was a problem hiding this comment.
That said, the comment ought to be reworded to say remove the slot instead of remove the task
cyli
left a comment
There was a problem hiding this comment.
LGTM pending comment update.
… service has been deleted. Signed-off-by: Anshul Pundir <anshul.pundir@docker.com>
|
LGTM, soon as it passes through CI. |
|
Passed, merging. |
No description provided.