GitHub user selvaganesang opened a pull request:
https://github.com/apache/trafodion/pull/1470
[TRAFODION-2853] memory leak of ComDiagsArea in CmpContext heap of mxosrvr
The ComDiagsArea is allocated in many places and from different heaps in
Trafodion, making it difficult to detect the source of the leak. Hence, a
different approach is taken to fix this issue.
Currently, ComDiagsArea is allocated in many places unconditionally even
when SQL statement completes execution without any error or warnings. Then it
is deallocated. Changed this strategy and allocate ComDiagsArea only when there
is an error or warning while compiling or executing the SQL statement.
This should help the product in two ways
1) To reduce the path length. The smaller query execution would
benefit the most by chopping of few more microseconds.
2) Reduce the memory growth due to leaked ComDiagsArea
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/selvaganesang/trafodion arkcmp_issue
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafodion/pull/1470.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 #1470
----
commit b97982c4494e078c5de2d883442d86265f24dadc
Author: selvaganesang <selva.govindarajan@...>
Date: 2018-03-09T01:19:35Z
[TRAFODION-2853] memory leak of ComDiagsArea in CmpContext heap of mxosrvr
The ComDiagsArea is allocated in many places and from different heaps in
Trafodion, making it difficult to
detect the source of the leak. Hence, a different approach is taken to fix
this issue.
Currently, ComDiagsArea is allocated in many places unconditionally even
when SQL statement completes
execution without any error or warnings. Then it is deallocated. Changed
this strategy and
allocate ComDiagsArea only when there is an error or warning while
compiling or executing the SQL statement.
This should help the product in two ways
1) To reduce the pathlength. The smaller query execution would benefit the
most by chopping of few more microseconds.
2) Reduce the memory growth due to leaked ComDiagsArea
commit 07f41ddb3042ac039252bd09955fb59bb80c8f9a
Author: selvaganesang <selva.govindarajan@...>
Date: 2018-03-12T23:53:49Z
[TRAFODION-2853] memory leak of ComDiagsArea in CmpContext heap of mxosrvr
Fixes for the regression failures seen with
b97982c4494e078c5de2d883442d86265f24dadc
This includes the change to report the error at the time of compilation
for invoke, showddl commands. Earlier errors were ignored during
prepare time and reported only at the time of execute for these commands
----
---