diff options
author | 2017-12-27 10:26:23 -0800 | |
---|---|---|
committer | 2017-12-27 10:30:07 -0800 | |
commit | baf6a0c183bb2897ff55ec884b1a6f26cc389bc2 (patch) | |
tree | 7ac5e3869f15fa0c61ab456885e99467f40215aa /tensorflow/core/distributed_runtime/worker.cc | |
parent | 2bf95689e547690321c0c5ef237f7df391190b5c (diff) |
Optionally store the status code/message in the response
body for RunGraph and RunStep RPCs, to workaround the fact that the
RPC subsystem truncates long metadata messages.
PiperOrigin-RevId: 180203356
Diffstat (limited to 'tensorflow/core/distributed_runtime/worker.cc')
-rw-r--r-- | tensorflow/core/distributed_runtime/worker.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tensorflow/core/distributed_runtime/worker.cc b/tensorflow/core/distributed_runtime/worker.cc index 6cd92f5fe7..8e303d6c51 100644 --- a/tensorflow/core/distributed_runtime/worker.cc +++ b/tensorflow/core/distributed_runtime/worker.cc @@ -109,6 +109,12 @@ Status Worker::PrepareRunGraph(RunGraphRequestWrapper* req, void Worker::RunGraphAsync(CallOptions* opts, RunGraphRequestWrapper* request, MutableRunGraphResponseWrapper* response, StatusCallback done) { + if (request->store_errors_in_response_body()) { + done = [response, done](const Status& status) { + response->set_status(status); + done(Status::OK()); + }; + } if (request->is_partial()) { DoPartialRunGraph(opts, request, response, std::move(done)); } else { |