Skip to content
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

Closed

Conversation

vlad-lesin
Copy link
Contributor

@vlad-lesin vlad-lesin commented Apr 12, 2018

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.

/* If this->table == NULL, then the current handler has been created but not
opened. Prohibit cloning such handler. */
if (!table)
DBUG_RETURN(NULL);
Copy link
Contributor

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);
Copy link
Contributor

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?

@vlad-lesin vlad-lesin force-pushed the native-partitioning-tokudb-draft-5.7 branch from 6db1de7 to 2ecb3d4 Compare May 3, 2018 14:07
vlad-lesin added 6 commits May 3, 2018 17:11
…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.
@vlad-lesin vlad-lesin force-pushed the native-partitioning-tokudb-draft-5.7 branch from 2ecb3d4 to b8c7df5 Compare May 3, 2018 14:25
@dutow
Copy link
Contributor

dutow commented Sep 5, 2019

Closing this now, as native partitioning is already merged in #2493

@dutow dutow closed this Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants