kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [2/2] kudu git commit: log_block_manager: fix Status::Aborted() message
Date Thu, 19 Oct 2017 00:59:48 GMT
log_block_manager: fix Status::Aborted() message

Updates the returned status of various calls in log_block_manager.cc
that would previously report incorrect substitution strings, e.g.:
Aborted: container $0 is read-only: /tmp/run_tha_testDcsmkj/test-tmp/tablet_server-test.TabletServerTest.TestDiskFailure.1508130389020340-2609/TabletServerTest-fsroot/data-1/data/462b2facc42d4b85a95b1153dda73095

Change-Id: I21bfd624e7414927044e2a23010ff1f888ff1cb3
Reviewed-on: http://gerrit.cloudera.org:8080/8282
Reviewed-by: Adar Dembo <adar@cloudera.com>
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <todd@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/43a64f8b
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/43a64f8b
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/43a64f8b

Branch: refs/heads/master
Commit: 43a64f8bf43721539a8b82789eb7fb44547638e8
Parents: c60990c
Author: Andrew Wong <awong@cloudera.com>
Authored: Mon Oct 16 11:03:34 2017 -0700
Committer: Adar Dembo <adar@cloudera.com>
Committed: Thu Oct 19 00:59:28 2017 +0000

----------------------------------------------------------------------
 src/kudu/fs/log_block_manager.cc | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/43a64f8b/src/kudu/fs/log_block_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/fs/log_block_manager.cc b/src/kudu/fs/log_block_manager.cc
index 1b489b8..da9b49b 100644
--- a/src/kudu/fs/log_block_manager.cc
+++ b/src/kudu/fs/log_block_manager.cc
@@ -704,7 +704,8 @@ Status LogBlockContainer::Open(LogBlockManager* block_manager,
     if (metadata_size < pb_util::kPBContainerMinimumValidLength &&
         data_size == 0) {
       report->incomplete_container_check->entries.emplace_back(common_path);
-      return Status::Aborted("orphaned empty metadata and data files $0");
+      return Status::Aborted(Substitute("orphaned empty metadata and data files $0",
+                                        common_path));
     }
   }
 
@@ -1220,9 +1221,8 @@ Status LogBlockDeletionTransaction::CommitDeletedBlocks(std::vector<BlockId>*
de
   }
 
   if (!first_failure.ok()) {
-    first_failure = first_failure.CloneAndPrepend(strings::Substitute("only deleted $0 blocks,
"
-                                                                      "first failure",
-                                                                      deleted->size()));
+    first_failure = first_failure.CloneAndPrepend(Substitute("only deleted $0 blocks, "
+                                                             "first failure", deleted->size()));
   }
   deleted_blocks_.clear();
   return first_failure;
@@ -1328,7 +1328,8 @@ Status LogWritableBlock::Abort() {
             block_length_);
       }
     }
-    return Status::Aborted("container $0 is read-only", container_->ToString());
+    return Status::Aborted(Substitute("container $0 is read-only",
+                                      container_->ToString()));
   }
 
   // Close the block and then delete it. Theoretically, we could do nothing


Mime
View raw message