From 009001eb915bc408faba6627ac2a0c9cea15b27d Mon Sep 17 00:00:00 2001 From: Helin Wang Date: Thu, 13 Apr 2017 16:07:17 -0700 Subject: [PATCH] add: the master need to use a transaction to update its states to ensure lock is held --- doc/design/dist/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/design/dist/README.md b/doc/design/dist/README.md index 73cd7449684..1788208bcab 100644 --- a/doc/design/dist/README.md +++ b/doc/design/dist/README.md @@ -116,7 +116,7 @@ When the master is started by the Kubernetes, it executes the following steps at 1. Grabs a unique *master* lock in etcd, which prevents concurrent master instantiations. 1. Recovers the task queues from etcd if they already exist, otherwise, the master will create them. 1. Watches the trainer prefix keys `/trainer/` on etcd to find the live trainers. -1. Starts dispatching the tasks to the trainers. +1. Starts dispatching the tasks to the trainers, and updates task queue using an etcd transaction to ensure lock is held during the update. The master process will kill itself if its etcd lease expires. -- GitLab