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

MDEV-35069 - IMPORT TABLESPACE does not work for tables with vector, although allowed #3631

Closed
wants to merge 1 commit into from

Conversation

svoj
Copy link
Contributor

@svoj svoj commented Nov 13, 2024

  • The Jira issue number for this PR is: MDEV-35069

Description

Propagate discard/import tablespace request to hlindexes.

Let FLUSH TABLES ... FOR EXPORT open/lock hlindexes, so that InnoDB prepares hlindexes for export.

Moved reset_hlindexes() to external_lock(F_UNLCK), so that hlindexes are available for export until UNLOCK TABLES.

Release Notes

Probably update "Copying Transportable Tablespaces" with information about VECTOR indexes. Their tablespaces have to be copied along with parent table.

How can this PR be tested?

mtr vector_innodb

Basing the PR against the correct MariaDB version

  • This is a new feature or a refactoring, and the PR is based against the main branch.
  • This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

@svoj svoj requested a review from vuvova November 13, 2024 12:58
@CLAassistant
Copy link

CLAassistant commented Nov 13, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@vuvova
Copy link
Member

vuvova commented Jan 22, 2025

Where does InnoDB "prepares hlindexes for export" (or tables, FWIW), REFRESH_FOR_EXPORT isn't passed down to the engine, as far as I can see.

I don't understand "reset_hlindexes" move either, why hlindexes aren't "available for export until UNLOCK TABLES" now?

@svoj
Copy link
Contributor Author

svoj commented Jan 24, 2025

@vuvova

Where does InnoDB "prepares hlindexes for export" (or tables, FWIW), REFRESH_FOR_EXPORT isn't passed down to the engine, as far as I can see.

ha_innobase::external_lock() / row_quiesce_table_start() / row_quiesce_write_cfg()

I don't understand "reset_hlindexes" move either, why hlindexes aren't "available for export until UNLOCK TABLES" now?

InnoDB creates .cfg file on FTFE and keeps it until UNLOCK TABLES (external_lock(F_UNLCK)). This file has to be copied along with .ibd to destination.

Currently hlindexes are open until handler::ha_reset(), that is end of statement. It means .cfg will be removed before FTFE itself completes.

Copy link
Member

@vuvova vuvova left a comment

Choose a reason for hiding this comment

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

ok to push, thanks

@vuvova vuvova force-pushed the pr-11.6-MDEV-32887 branch from e5c418c to 124bbdf Compare February 6, 2025 18:32
vuvova pushed a commit that referenced this pull request Feb 6, 2025
…though allowed

Propagate discard/import tablespace request to hlindexes.

Let FLUSH TABLES ... FOR EXPORT open/lock hlindexes, so that InnoDB
prepares hlindexes for export.

Moved reset_hlindexes() to external_lock(F_UNLCK), so that hlindexes
are available for export until UNLOCK TABLES.

Closes #3631
…although allowed

Propagate discard/import tablespace request to hlindexes.

Let FLUSH TABLES ... FOR EXPORT open/lock hlindexes, so that InnoDB
prepares hlindexes for export.

Moved reset_hlindexes() to external_lock(F_UNLCK), so that hlindexes
are available for export until UNLOCK TABLES.
@svoj svoj force-pushed the pr-11.6-MDEV-32887 branch from 124bbdf to dea3211 Compare February 7, 2025 12:39
@svoj svoj changed the base branch from main to 11.7 February 7, 2025 12:39
vuvova pushed a commit that referenced this pull request Feb 9, 2025
…though allowed

Propagate discard/import tablespace request to hlindexes.

Let FLUSH TABLES ... FOR EXPORT open/lock hlindexes, so that InnoDB
prepares hlindexes for export.

Moved reset_hlindexes() to external_lock(F_UNLCK), so that hlindexes
are available for export until UNLOCK TABLES.

Closes #3631
@vuvova vuvova closed this in 55d1f6c Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants