You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by da...@apache.org on 2017/12/09 00:00:00 UTC
kudu git commit: catalog-manager: fix some duplicated error messages
Repository: kudu
Updated Branches:
refs/heads/master add943f02 -> 157228a4d
catalog-manager: fix some duplicated error messages
A few places in the catalog manager were using Status::CloneAndPrepend
improperly. These are really hard to trigger conditions, so it's rare
they'd be seen in the wild.
Change-Id: I41b54c6f003d81c53c648370b08ed5af2be58b64
Reviewed-on: http://gerrit.cloudera.org:8080/8805
Reviewed-by: Hao Hao <ha...@cloudera.com>
Reviewed-by: Alexey Serbin <as...@cloudera.com>
Tested-by: Kudu Jenkins
Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/157228a4
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/157228a4
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/157228a4
Branch: refs/heads/master
Commit: 157228a4db9f81f434b09f73addf183ee6a8bdbe
Parents: add943f
Author: Dan Burkert <da...@apache.org>
Authored: Fri Dec 8 15:05:49 2017 -0800
Committer: Dan Burkert <da...@apache.org>
Committed: Fri Dec 8 23:59:41 2017 +0000
----------------------------------------------------------------------
src/kudu/master/catalog_manager.cc | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kudu/blob/157228a4/src/kudu/master/catalog_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/catalog_manager.cc b/src/kudu/master/catalog_manager.cc
index acea922..10e0f37 100644
--- a/src/kudu/master/catalog_manager.cc
+++ b/src/kudu/master/catalog_manager.cc
@@ -1178,8 +1178,7 @@ Status ValidateClientSchema(const boost::optional<string>& name,
col.attributes().encoding,
&dummy);
if (!s.ok()) {
- return s.CloneAndPrepend(
- Substitute("invalid encoding for column '$0'", col.name()));
+ return s.CloneAndPrepend(Substitute("invalid encoding for column '$0'", col.name()));
}
}
return Status::OK();
@@ -1406,8 +1405,7 @@ Status CatalogManager::CreateTable(const CreateTableRequestPB* orig_req,
actions.tablets_to_add = tablets;
s = sys_catalog_->Write(actions);
if (!s.ok()) {
- s = s.CloneAndPrepend(Substitute("An error occurred while writing to sys-catalog: $0",
- s.ToString()));
+ s = s.CloneAndPrepend("an error occurred while writing to the sys-catalog");
LOG(WARNING) << s.ToString();
CheckIfNoLongerLeaderAndSetupError(s, resp);
return s;
@@ -1599,8 +1597,7 @@ Status CatalogManager::DeleteTable(const DeleteTableRequestPB* req,
actions.tablets_to_update.assign(tablets.begin(), tablets.end());
Status s = sys_catalog_->Write(actions);
if (!s.ok()) {
- s = s.CloneAndPrepend(Substitute("An error occurred while updating sys tables: $0",
- s.ToString()));
+ s = s.CloneAndPrepend("an error occurred while updating the sys-catalog");
LOG(WARNING) << s.ToString();
CheckIfNoLongerLeaderAndSetupError(s, resp);
return s;
@@ -2081,9 +2078,7 @@ Status CatalogManager::AlterTable(const AlterTableRequestPB* req,
Status s = sys_catalog_->Write(actions);
if (!s.ok()) {
- s = s.CloneAndPrepend(
- Substitute("An error occurred while updating sys-catalog tables entry: $0",
- s.ToString()));
+ s = s.CloneAndPrepend("an error occurred while updating the sys-catalog");
LOG(WARNING) << s.ToString();
CheckIfNoLongerLeaderAndSetupError(s, resp);
return s;
@@ -2541,7 +2536,7 @@ Status RetryingTSRpcTask::Run() {
return Status::OK();
}
} else {
- s = s.CloneAndPrepend("Failed to reset TS proxy");
+ s = s.CloneAndPrepend("failed to reset TS proxy");
}
if (!RescheduleWithBackoffDelay()) {