diff options
author | Brennan Saeta <saeta@google.com> | 2018-07-03 16:42:52 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-03 16:48:00 -0700 |
commit | fb58f1d287e7210bebc22e0946b969c2ec0303e7 (patch) | |
tree | c0df63eed530202a8bf416dea8e9c8b783ff7d13 /tensorflow/contrib/bigtable | |
parent | bd94b1022074d90a73917f3cd15c0866d79c224d (diff) |
[tf.data / Bigtable] Log mutation_status errors.
Some errors returned from the Bigtable client are not proper utf8 strings. As a result, when we construct the errors::Unknown error to return to the client, the resulting error message gets suppressed. In order to ensure that some useful context is always available to users, we log the error message in addition to returning it.
PiperOrigin-RevId: 203203543
Diffstat (limited to 'tensorflow/contrib/bigtable')
-rw-r--r-- | tensorflow/contrib/bigtable/kernels/bigtable_kernels.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tensorflow/contrib/bigtable/kernels/bigtable_kernels.cc b/tensorflow/contrib/bigtable/kernels/bigtable_kernels.cc index f43b44f2cb..24be38758f 100644 --- a/tensorflow/contrib/bigtable/kernels/bigtable_kernels.cc +++ b/tensorflow/contrib/bigtable/kernels/bigtable_kernels.cc @@ -240,6 +240,12 @@ class ToBigtableOp : public AsyncOpKernel { grpc::Status mutation_status; std::vector<::google::cloud::bigtable::FailedMutation> failures = resource->table().BulkApply(std::move(mutation), mutation_status); + if (!mutation_status.ok()) { + LOG(ERROR) << "Failure applying mutation: " + << mutation_status.error_code() << " - " + << mutation_status.error_message() << " (" + << mutation_status.error_details() << ")."; + } if (!failures.empty()) { for (const auto& failure : failures) { LOG(ERROR) << "Failure applying mutation on row (" |