Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/trafodion/pull/1449#discussion_r168860580
--- Diff: core/sql/cli/Globals.cpp ---
@@ -176,10 +176,21 @@ void CliGlobals::init( NABoolean espProcess,
cli_globals = this;
int error;
statsGlobals_ = (StatsGlobals *)shareStatsSegment(shmId_);
- if (statsGlobals_ == NULL
- || (statsGlobals_ != NULL &&
- statsGlobals_->getVersion() !=
StatsGlobals::CURRENT_SHARED_OBJECTS_VERSION_))
+ NABoolean reportError = FALSE;
+ char msg[256];;
+ if (statsGlobals_ != NULL && myPin_ >=
statsGlobals_->getConfiguredPidMax())
+ reportError = TRUE;
+ if ((statsGlobals_ == NULL)
+ || ((statsGlobals_ != NULL) &&
+ ((statsGlobals_->getVersion() !=
StatsGlobals::CURRENT_SHARED_OBJECTS_VERSION_) ||
+ (myPin_ >= statsGlobals_->getConfiguredPidMax()))))
{
+ if (reportError) {
--- End diff --
Could this lead to a log storm? Imagine that thousands of SQL processes
with Pids that are too high come and go. (If there is one, there is likely to
be many.) Could we blow up our logs?
---