Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

[TRAFODION-2170] certain create table DDL will fail with core dump #834

Merged
merged 1 commit into from
Nov 16, 2016

Conversation

moscowgentalman
Copy link
Contributor

If the DDL has defined the total cluster key length greater than 2048, it will corrupt the memory and cause various core dump.
the fix is to allocate enough memory for the given key. It is not recommended to use very long clustering key, but should be allowed.

@Traf-Jenkins
Copy link

Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/1357/

@Traf-Jenkins
Copy link

@selvaganesang
Copy link
Contributor

It is not clear why we need to impose the restriction on the length of the DDL string. The length of the DDL string is known in advance. Isn't possible to allocate the required length instead of allocating the pre-defined length.

Copy link
Contributor

@DaveBirdsall DaveBirdsall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 Looks OK to me.

@moscowgentalman
Copy link
Contributor Author

@selvaganesang , there is no reason to restrict the length of the DDL string from my point of view as well. This change is to remove one of the fixed length buffer allocation instead use dynamic allocation.
I will study the rest of the code here in subsequent fixes. @prashanth-vasudev is also refactoring this same file, so I would like to further fix others after his refactoringis done. This PR is submitted now, because in some other forks, same change already done, so this will help the code merging. And also required to get rid of the DDL core dump which we saw several times.

@selvaganesang
Copy link
Contributor

@traflm Please go ahead and merge if needed because it avoids the core dump and fixes a memory leak in TM.

@moscowgentalman
Copy link
Contributor Author

thanks all for review.

@asfgit asfgit merged commit 25fb23e into apache:master Nov 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
5 participants