You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hawq.apache.org by linwen <gi...@git.apache.org> on 2017/05/17 10:02:32 UTC

[GitHub] incubator-hawq pull request #1242: HAWQ-1469. Don't expose warning messages ...

GitHub user linwen opened a pull request:

    https://github.com/apache/incubator-hawq/pull/1242

    HAWQ-1469. Don't expose warning messages to command line when switch between master and standby RPS.

    Please review. Thanks! 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/linwen/incubator-hawq hawq-1469

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-hawq/pull/1242.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1242
    
----
commit d719f9ddc8f948d00bd6d8ca687ce1f0d5ee4345
Author: Wen Lin <wl...@pivotal.io>
Date:   2017-05-17T09:57:45Z

    HAWQ-1469. Don't expose warning messages to command line when switch between master and standby RPS.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request #1242: HAWQ-1469. Don't expose warning messages ...

Posted by linwen <gi...@git.apache.org>.
Github user linwen commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1242#discussion_r116961874
  
    --- Diff: src/backend/libpq/rangerrest.c ---
    @@ -453,23 +453,30 @@ static int call_ranger_rest(CURL_HANDLE curl_handle, const char* request)
     		{
     			if (retry > 1)
     			{
    -				elog(WARNING, "ranger plugin service from http://%s:%d/rps is unavailable : %s, try another http://%s:%d/rps\n",
    +				/* Don't expose this warning message to client, just record in log.
    +				 * The value of whereToSendOutput is DestRemote, so set it to DestNone
    +				 * and set back after write a warning message in log file.
    +				 */
    +				CommandDest commandDest = whereToSendOutput;
    +				whereToSendOutput = DestNone;
    +				elog(WARNING, "ranger plugin service from http://%s:%d/rps is unavailable : %s, "
    +						"trying ranger plugin service at http://%s:%d/rps\n",
    --- End diff --
    
    When master RPS doesn't work due to some reason, and hawq begins to talk with standby RPS, a warning message should be recorded in log file, so that administrators can solve the master RPS problem. elog(LOG, ...) won't expose to console(by default, client_min_sessages is NOTICE), but in this switch case, a warning should be recorded. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request #1242: HAWQ-1469. Don't expose warning messages ...

Posted by linwen <gi...@git.apache.org>.
Github user linwen closed the pull request at:

    https://github.com/apache/incubator-hawq/pull/1242


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq issue #1242: HAWQ-1469. Don't expose warning messages to comm...

Posted by paul-guo- <gi...@git.apache.org>.
Github user paul-guo- commented on the issue:

    https://github.com/apache/incubator-hawq/pull/1242
  
    +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request #1242: HAWQ-1469. Don't expose warning messages ...

Posted by paul-guo- <gi...@git.apache.org>.
Github user paul-guo- commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1242#discussion_r116960903
  
    --- Diff: src/backend/libpq/rangerrest.c ---
    @@ -453,23 +453,30 @@ static int call_ranger_rest(CURL_HANDLE curl_handle, const char* request)
     		{
     			if (retry > 1)
     			{
    -				elog(WARNING, "ranger plugin service from http://%s:%d/rps is unavailable : %s, try another http://%s:%d/rps\n",
    +				/* Don't expose this warning message to client, just record in log.
    +				 * The value of whereToSendOutput is DestRemote, so set it to DestNone
    +				 * and set back after write a warning message in log file.
    +				 */
    +				CommandDest commandDest = whereToSendOutput;
    +				whereToSendOutput = DestNone;
    +				elog(WARNING, "ranger plugin service from http://%s:%d/rps is unavailable : %s, "
    +						"trying ranger plugin service at http://%s:%d/rps\n",
    --- End diff --
    
    If so, why not just remove the code and add comments here? Does elog(LOG, ...) possibly expose this to users?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---