aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/protobuf
diff options
context:
space:
mode:
authorGravatar Derek Murray <mrry@google.com>2018-04-18 15:27:05 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-04-18 15:30:46 -0700
commit80f60ea37ed77b3dbe1d983f101a5efba2fd4f2e (patch)
treec9a5679baed7ff915eb78ac853f02c62224e4b39 /tensorflow/core/protobuf
parente662c3fcfcd03fd091b032a5a33971428f4cdb89 (diff)
Never use the LegacySession when a Master explicitly calls CreateWorkerSession.
Previously, if the session handle was unrecognized by the worker, it would default to using the LegacySession. This prevents us from noticing that a server has been restarted. To address the problem in a backwards-compatible way, we add a bit to each session-handle-carrying worker request, indicating whether the master believes that CreateWorkerSession has been called. If this bit is set and the handle is unrecognized, the worker will raise an AbortedError, which can be caught by high-level frameworks such as `tf.estimator`. Note that CreateWorkerSession is not yet used by default, and a follow-up change will add that. PiperOrigin-RevId: 193427057
Diffstat (limited to 'tensorflow/core/protobuf')
-rw-r--r--tensorflow/core/protobuf/worker.proto11
1 files changed, 10 insertions, 1 deletions
diff --git a/tensorflow/core/protobuf/worker.proto b/tensorflow/core/protobuf/worker.proto
index 3e7289bd91..1819a35248 100644
--- a/tensorflow/core/protobuf/worker.proto
+++ b/tensorflow/core/protobuf/worker.proto
@@ -103,6 +103,9 @@ message RegisterGraphRequest {
// Subgraphs are scoped within one session.
string session_handle = 1;
+ // Set to true if `CreateWorkerSession` was called for `session_handle`.
+ bool create_worker_session_called = 6;
+
// "graph_def" has the subgraph of nodes for this worker, with each node
// having its device_name filled in.
GraphDef graph_def = 2;
@@ -144,6 +147,9 @@ message DeregisterGraphRequest {
// empty, a single global namespace is used.
string session_handle = 2;
+ // Set to true if `CreateWorkerSession` was called for `session_handle`.
+ bool create_worker_session_called = 3;
+
// REQUIRED: graph_handle must be returned by a RegisterGraph call
// to the same WorkerService.
string graph_handle = 1;
@@ -200,6 +206,9 @@ message RunGraphRequest {
// search for the graph_handle.
string session_handle = 8;
+ // Set to true if `CreateWorkerSession` was called for `session_handle`.
+ bool create_worker_session_called = 10;
+
// REQUIRED: graph_handle must be returned by a RegisterGraph call
// to the same WorkerService.
string graph_handle = 1;
@@ -234,7 +243,7 @@ message RunGraphRequest {
// truncate long metadata messages.
bool store_errors_in_response_body = 9;
- // Next: 10
+ // Next: 11
}
message RunGraphResponse {