[
https://issues.apache.org/jira/browse/TRAFODION-2628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16090352#comment-16090352
]
ASF GitHub Bot commented on TRAFODION-2628:
-------------------------------------------
Github user zellerh commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/1170#discussion_r127796161
--- Diff: core/sql/cli/Globals.cpp ---
@@ -187,18 +187,9 @@ void CliGlobals::init( NABoolean espProcess,
ComRtGetProcessPriority(myPriority_);
savedPriority_ = (short)myPriority_;
- myNumSegs_ = 0;
- myNumCpus_ = 0;
- SEGMENT_INFO * segs = new(&executorMemory_)
SEGMENT_INFO[MAX_NO_OF_SEGMENTS];
- ComRtGetSegsInfo(segs, MAX_NO_OF_SEGMENTS, myNumSegs_,
- (NAHeap *)&executorMemory_);
- for (Lng32 i = 0; i < myNumSegs_; i++)
- {
- myNumCpus_ += segs[i].noOfCpus_;
- }
- NADELETEARRAY(segs, MAX_NO_OF_SEGMENTS, SEGMENT_INFO, &executorMemory_);
+ myNumCpus_ = ComRtGetCPUArray(cpuArray_, (NAHeap *)&executorMemory_);
--- End diff --
Good question, what do you think? I'm a bit scared to assert, because that
could make the whole system inaccessible. Could we log an error event instead?
But I'm not sure whether that is possible at the time when we create the CLI
globals, maybe the event log code is dependent on something that has not been
created yet. I'll check and add either an assert or a log event.
> SQL engine work for Elasticity [TRAFODION-2001]
> -----------------------------------------------
>
> Key: TRAFODION-2628
> URL: https://issues.apache.org/jira/browse/TRAFODION-2628
> Project: Apache Trafodion
> Issue Type: Sub-task
> Components: sql-cmp
> Affects Versions: 2.2-incubating
> Reporter: Hans Zeller
> Assignee: Hans Zeller
> Fix For: 2.2-incubating
>
>
> See discussion in TRAFODION-2001. We need to accommodate node ids in a
> cluster that contain "holes".
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)