You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by selvaganesang <gi...@git.apache.org> on 2017/09/13 23:30:09 UTC
[GitHub] incubator-trafodion pull request #1231: [Trafodion 2733] RMS semaphore handl...
GitHub user selvaganesang opened a pull request:
https://github.com/apache/incubator-trafodion/pull/1231
[Trafodion 2733] RMS semaphore handling need to log the error for easy resolution of the issue
RMS semaphore handling had the following:
1) Passed in parameters that are no longer used. It had these parameters for legacy reasons
2) Was returning errno as short as return code. This might have caused unexplainable behavior
at times.
3) The caller was aborting for non-zero return value, but the return value is not easily visible.
All the above problems have been fixed in this PR.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/selvaganesang/incubator-trafodion trafodion-2739
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafodion/pull/1231.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 #1231
----
commit 46711b8c4ffc54f15f7e571da782dd38fe0996b6
Author: selvaganesang <se...@esgyn.com>
Date: 2017-09-13T22:24:12Z
[TRAFODION-2739] RMS semaphore handling need to log the error for easy resolution of the issue
RMS semaphore handling had the following:
1) Passed in parameters that are no longer used. It had these parameters for legacy reasons
2) Was returning errno as short as return code. This might have caused unexplainable behavior
at times.
3) The caller was aborting for non-zero return value, but the return value is not easily visible.
All the above problems have been fixed in this PR.
commit 0fc4b57ff314b0ea6b884f7b19d48949e58eefc2
Author: selvaganesang <se...@esgyn.com>
Date: 2017-09-13T23:24:45Z
Merge branch 'master' of git://git.apache.org/incubator-trafodion into trafodion-2739
----
---
[GitHub] incubator-trafodion pull request #1231: [Trafodion 2733] RMS semaphore handl...
Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/1231#discussion_r138773979
--- Diff: core/sql/cli/Cli.cpp ---
@@ -8325,19 +8325,15 @@ Lng32 SQLCLI_RegisterQuery(CliGlobals *cliGlobals,
StatsGlobals *statsGlobals = cliGlobals->getStatsGlobals();
if (statsGlobals == NULL)
return retcode;
- short error;
- short savedPriority, savedStopMode;
+ int error;
error = statsGlobals->getStatsSemaphore(cliGlobals->getSemId(),
- cliGlobals->myPin(),
- savedPriority, savedStopMode, FALSE /*shouldTimeout*/);
- ex_assert(error == 0, "getStatsSemaphore() returned an error");
-
+ cliGlobals->myPin());
--- End diff --
Why do we ignore the error?
---
[GitHub] incubator-trafodion pull request #1231: [Trafodion 2739] RMS semaphore handl...
Posted by selvaganesang <gi...@git.apache.org>.
Github user selvaganesang commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/1231#discussion_r138777511
--- Diff: core/sql/cli/Cli.cpp ---
@@ -8325,19 +8325,15 @@ Lng32 SQLCLI_RegisterQuery(CliGlobals *cliGlobals,
StatsGlobals *statsGlobals = cliGlobals->getStatsGlobals();
if (statsGlobals == NULL)
return retcode;
- short error;
- short savedPriority, savedStopMode;
+ int error;
error = statsGlobals->getStatsSemaphore(cliGlobals->getSemId(),
- cliGlobals->myPin(),
- savedPriority, savedStopMode, FALSE /*shouldTimeout*/);
- ex_assert(error == 0, "getStatsSemaphore() returned an error");
-
+ cliGlobals->myPin());
--- End diff --
Any error would have asserted in StatsGlobals::getStatsSemaphore() method itself
---
[GitHub] incubator-trafodion pull request #1231: [Trafodion 2739] RMS semaphore handl...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-trafodion/pull/1231
---