-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native partitioning tokudb draft 5.7 #2313
Native partitioning tokudb draft 5.7 #2313
Conversation
/* If this->table == NULL, then the current handler has been created but not | ||
opened. Prohibit cloning such handler. */ | ||
if (!table) | ||
DBUG_RETURN(NULL); |
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.
Is this something we would expect to happen at all or is this really some strong error case where an assertion might be more appropriate?
new_handler= new (mem_root) ha_tokupart(ht, table_share, m_part_info, | ||
this, mem_root); | ||
if (!new_handler) | ||
DBUG_RETURN(NULL); |
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.
Same, this seems like an OOM problem so maybe a hard assertion/abort is in order?
6db1de7
to
2ecb3d4
Compare
…ct' functionality. The general issue is that native partitioning initialization sequence is not the same as for non-native partitioning. Some functions are invoked before partition info is filled in, and, as a result, we can't initialize the array of partition file handlers. That is why the array initialization was moved to "open/create" functions, they are invoked when all necessary information is gathered from statement or *.frm file. The another issue was using the correct mem_root object for file handlers allocation. The initial code uses thd->mem_root, what is wrong, because it will be deallocated after query execution, and it worked only because thd->mem_root object was replaced with share->mem_root just before file handlers initialization. The current code uses share->mem_root explicitly.
2ecb3d4
to
b8c7df5
Compare
Closing this now, as native partitioning is already merged in #2493 |
This PR is for preliminary code review and implementation details discussion, please, DON'T merge it.
It's more convenient to review the code commit-by-commit because the first two commits is just a copy of ha_partition.* and renaming the correspondent classes. Otherwise to see the changes in non-native-partitioning handler it is necessary to use "diff".
Also it's supposed that Partition_base will be used for RocksDB too. In the code there are first steps to split common and partition-specific code.