You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by yj...@apache.org on 2016/03/16 03:38:05 UTC
incubator-hawq git commit: HAWQ-542. Passing empty string to
attribute vseg_resource_quota makes default value set instead of reporting
error
Repository: incubator-hawq
Updated Branches:
refs/heads/master ca2a77088 -> 31eb645b4
HAWQ-542. Passing empty string to attribute vseg_resource_quota makes default value set instead of reporting error
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/31eb645b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/31eb645b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/31eb645b
Branch: refs/heads/master
Commit: 31eb645b44bbd8ec453dbcb33a491c16f3f69178
Parents: ca2a770
Author: YI JIN <yj...@pivotal.io>
Authored: Wed Mar 16 13:37:55 2016 +1100
Committer: YI JIN <yj...@pivotal.io>
Committed: Wed Mar 16 13:37:55 2016 +1100
----------------------------------------------------------------------
src/backend/resourcemanager/resqueuemanager.c | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/31eb645b/src/backend/resourcemanager/resqueuemanager.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resqueuemanager.c b/src/backend/resourcemanager/resqueuemanager.c
index 7bc0e7b..cbf824e 100644
--- a/src/backend/resourcemanager/resqueuemanager.c
+++ b/src/backend/resourcemanager/resqueuemanager.c
@@ -346,6 +346,17 @@ int shallowparseResourceQueueWithAttributes(List *rawattr,
case RSQ_DDL_ATTR_NVSEG_UPPER_LIMIT_PERSEG:
case RSQ_DDL_ATTR_NVSEG_LOWER_LIMIT_PERSEG:
{
+
+ /* The empty value is not allowed. */
+ if ( SimpleStringEmpty(&(property->Val)) )
+ {
+ snprintf(errorbuf, errorbufsize,
+ "the value of %s cannot be empty",
+ RSQDDLAttrNames[attrindex]);
+ elog(WARNING, "Resource manager failed parsing attribute, %s",
+ errorbuf);
+ return RMDDL_WRONG_ATTRVALUE;
+ }
/*
* Build property.
*