TRAFODION-2873. Cleanup of LobGlobals and LobLoad classes #1365
Conversation
…erts into LOB tables. The fix involves cleaning up the LOBGlibals and eliminating unneeded datamemebers and keeping only the ExLobGlobals members. Also cleaned up all LobLoad related code since it is obsolete and worked only with DP2. Conflicts: core/sql/executor/ExExeUtilLoad.cpp
Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/2302/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 Looks good. One minor suggestion.
core/sql/exp/exp_clause.cpp
Outdated
@@ -574,8 +574,8 @@ ex_clause::ex_clause(clause_type type, | |||
case ITM_LOBCONVERTHANDLE: | |||
setClassID(LOB_CONVERTHANDLE); | |||
break; | |||
case ITM_LOBLOAD: | |||
setClassID(LOB_LOAD); | |||
/* case ITM_LOBLOAD: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe delete these lines (and the break after them) instead of commenting out?
Test Failed. https://jenkins.esgyn.com/job/Check-PR-master/2302/ |
Previous Test Aborted. New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/2304/ |
Test Failed. https://jenkins.esgyn.com/job/Check-PR-master/2304/ |
Seabase suite build failed for unknown reasons... starting a retest |
jenkins, retest |
New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/2305/ |
Test Passed. https://jenkins.esgyn.com/job/Check-PR-master/2305/ |
Is ExLobGlobals pertain to the Statement or ExGlobals or the ContextCli or the process? |
The ExLobGlobals is created whenever a statement or internal API needs to access the LOB functions. It maintains the hdfs connection info, the various lob pointers it needs to access (based on name) .It is currently a member of ex_globals.It's initialized once per TCB. |
If so, won't it be better to create it using heap_ associated with ex_globals. If there is a connection info that can be shared across context or ESP fragments, separate them out and store it in cli_globals, Pass that info to ExLobGlobals in ex_globals. It is strange to see the ExLobGlobals being constructed from system heap. And I couldn't find where is it being deleted? There is a possibility of memory leak. |
The ExLobGlobals is deleted in ExpLOBinterfaceCleanup. Will look at getting rid of system new. There was some issue with using the Map template class with an internal heap. The lobPtrs are stored as a standard template class within the ExLobGlobals. |
This fix also avoids a core that was very occasionally caused during inserts into LOB tables. The fix involves cleaning up the LOBGlibals and eliminating unneeded datamemebers and keeping only the ExLobGlobals members. Also cleaned up all LobLoad related code since it is obsolete and worked only with DP2.