-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
MDEV-36733 Clone: Support Local Clone #4248
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
Draft
Thirunarayanan
wants to merge
103
commits into
main
Choose a base branch
from
main-MDEV-36733
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
103 commits
Select commit
Hold shift + click to select a range
6adbda3
Clone Plugin - Oracle 9.1.0 Innovation
mariadb-DebarunBanerjee 6ec37ac
Clone Plugin - Compile plugin part-I
mariadb-DebarunBanerjee 7d798e6
Clone Plugin - Compile plugin part-II
mariadb-DebarunBanerjee 199ab4c
Clone Plugin - Services: Exccuding configs and validation
mariadb-DebarunBanerjee 132c029
Clone Plugin - Syntax and server changes to interface with Clone Plugin
mariadb-DebarunBanerjee db78e9c
Clone Plugin - Fix Plugin load issue
mariadb-DebarunBanerjee 5376f84
Clone Plugin - Fix PFS initialization issue
mariadb-DebarunBanerjee 02011da
Clone Plugin - Donor List Validation, NO SSL
mariadb-DebarunBanerjee cbad4d8
Clone Innodb - Oracle 9.1.0 Innovation
mariadb-DebarunBanerjee c6c717d
Clone Innodb Archive - Compile part-I
mariadb-DebarunBanerjee c29f565
Clone Innodb Archive - Compile part-II
mariadb-DebarunBanerjee 888acaa
Clone Innodb Log Archive - Compile part-I
mariadb-DebarunBanerjee 88c18f3
Clone Innodb Log Archive - Compile part-II
mariadb-DebarunBanerjee 6929845
Clone Innodb - Compile part-I
mariadb-DebarunBanerjee 26004ed
Clone Innodb - Compile part-II
mariadb-DebarunBanerjee 12001aa
Clone Innodb - Compile part-III
mariadb-DebarunBanerjee b03c092
Clone Innodb - Compile part-IV
mariadb-DebarunBanerjee f878d83
Clone Plugin - Services: Configs and validation
mariadb-DebarunBanerjee 3b657ea
Clone Innodb - Compile part-V
mariadb-DebarunBanerjee c3f1edf
Clone - Key flow part-I
mariadb-DebarunBanerjee adda516
Clone - Fix compilation issues after 12.0 merge
mariadb-DebarunBanerjee d891e81
Clone - Key flow part-II: Archiver Background
mariadb-DebarunBanerjee 40aecac
Clone - Key flow part-III: Page Archiver Duplicate Detection
mariadb-DebarunBanerjee a7d81f7
Clone - Key flow part-IV: Log Archiver Synchronization
mariadb-DebarunBanerjee 869fc5a
Clone - Key flow part-V: Remote Clone
mariadb-DebarunBanerjee 270e292
Clone - Multiple SE: Remote Protocol and Concurrency
mariadb-DebarunBanerjee 396cf4f
Clone - Multiple SE: Handler Interface Multi-Phase
mariadb-DebarunBanerjee 98637bf
Clone - Multiple SE: local/remote synchronization for multi stage
mariadb-DebarunBanerjee 8a5f74d
Clone - Multiple SE: Common SE handlerton
mariadb-DebarunBanerjee dc2e27e
Clone - Multiple SE: Common SE FRM and related files
mariadb-DebarunBanerjee f1017a9
Clone - Multiple SE: ARIA
mariadb-DebarunBanerjee 7db18f8
Clone Innodb - Fix redo header LSN & checkpoint LSN
mariadb-DebarunBanerjee 176ab2b
Clone Final Integration: Various fixes
mariadb-DebarunBanerjee 7b122d1
Clone Binary Log GTID
mariadb-DebarunBanerjee bcae5ae
Archiver: LSN related changes to cope with
mariadb-DebarunBanerjee 59fa7f9
Clone Tests - Oracle 9.4.0 Innovation
mariadb-DebarunBanerjee df1fcd3
- Implemented BACKUP STAGE command service from CLONE plugin
Thirunarayanan 7130387
- Handled free page while doing PAGE_APPLY phase
Thirunarayanan d08c41a
- Addressed clone_start_statement failure when multiple worker
Thirunarayanan f5015ae
Added 4 test case so far:
Thirunarayanan 8a18baf
- Removed XA related code in clone plugin
Thirunarayanan 8b39ba2
- Failed to include .opt for create schema and local_file_extend test…
Thirunarayanan be3d4b2
- Made changes in clone.local_boundary
Thirunarayanan be93c48
- Disable page_compressed and encrypted tablespace for clone operation
Thirunarayanan 78f1d31
- Removed page_compressed test case
Thirunarayanan 6979c81
Clone Page Copy: Free Page
mariadb-DebarunBanerjee b3ea309
Redo Archiver PMEM: Prevent overwrite
mariadb-DebarunBanerjee 8e819ab
Clone redo copy: Multiple archiver files to single file
mariadb-DebarunBanerjee 24845e2
- Block remote clone and remote replace clone
Thirunarayanan 8ec30b5
- Added clone.monitor_progress test case
Thirunarayanan dc10fae
- Removed the remote related test case.
Thirunarayanan 6df9a77
- Added the test case to check proper permission before doing clone o…
Thirunarayanan 7d3f173
- Removed the ddl related test case
Thirunarayanan a29a14c
- Removed unused test and unused result file
Thirunarayanan 8cc42df
- Made some test case changes to consistently print restart_parameters
Thirunarayanan 0c2afac
- Made the changes in mysql-test-run.pl to run the clone suite by def…
Thirunarayanan 00cb719
Fix clone.local_boundary
mariadb-DebarunBanerjee f82f5e2
Fix Execution State: Error handling
mariadb-DebarunBanerjee a9dd74f
Fix clone.error_archival
mariadb-DebarunBanerjee 8caf907
Log Archiver: LSN alignment to start_lsn
mariadb-DebarunBanerjee f8edeec
- Change in backup_stage_and_lock test case
Thirunarayanan 1bcf1c6
- Abort redo log resizing when clone is in progress.
Thirunarayanan 7b16875
- Added Aria based clone testcase
Thirunarayanan dedc81e
Fixing compilation failure
Thirunarayanan 0dc178d
- Fixed mariabackup, perfschema and sysschema suite test case failures
Thirunarayanan 05f4462
- Added have_debug.inc for clone.aria_basic
Thirunarayanan ef85e78
Fixing few more test case failure
Thirunarayanan 2c0819e
- Fixed the compilation for embedded build
Thirunarayanan 1c99fe4
- Fixing compilation failure
Thirunarayanan 916577f
- Few more compilation issue
Thirunarayanan 2912e76
- Fixed clone.aria_basic test case
Thirunarayanan e29d405
Fix clone recovery with redo file larger than configured size
mariadb-DebarunBanerjee b072ae1
Innodb Clone: Implement HA_CLONE_STAGE_SNAPSHOT
mariadb-DebarunBanerjee c791b48
- Fixed msan failure and few more compilation issues
Thirunarayanan 5a8d59b
- Few more compilation on other build
Thirunarayanan d2826d7
- Fix compilation issue for windows
Thirunarayanan cabb54d
- Fixed windows compilation
Thirunarayanan 7f61989
- Fixing windows compilation
Thirunarayanan e53df6b
- Fixing wstring compilation issue
Thirunarayanan 16a4492
- Fixing debian build failure
Thirunarayanan 543ae83
- Fixing windows build
Thirunarayanan 84f1d5e
- Trying to fix debian build
Thirunarayanan e3c758e
- Fixed ps-protocol failure and few warnings
Thirunarayanan 80bbba3
- Suppress warning
Thirunarayanan 3b92be0
- Suppress few more warning
Thirunarayanan e497a7e
- Fix some warning
Thirunarayanan 360d8ff
MDEV-37520 Failure to detect corruption during backups of Aria table
Thirunarayanan b5b84e5
- More aria test case
Thirunarayanan c229b31
- Clone should stop executing when redo log resizing, undo log trunca…
Thirunarayanan b518b81
- Add filesystem library for maria storage cmake
Thirunarayanan c82accc
- Make it compile on few platforms
Thirunarayanan f7f7ffb
- Fixing 32bit build.
Thirunarayanan 61bfca8
- Use experimental::filesystem for the compiler less than GNU 9
Thirunarayanan 72edd92
- Fixing compilation issue
Thirunarayanan 8ea38e1
- Fixing more compilation
Thirunarayanan c05dba2
- Fixing more compilation issue
Thirunarayanan da42154
MDEV-36739: Porting test from Maria Backup to Clone
mariadb-satishkumar 7cc113f
- Fixed few test case result changes.
Thirunarayanan 6234b1f
- Compilation for embedded build without clone related code
Thirunarayanan b3dbab4
Link filesystem library for compiler less than gnu-9 version
Thirunarayanan 1f64eef
- Fixing few more test case failures
Thirunarayanan d15ab64
- Removing all unused test case
Thirunarayanan 4fd2564
- Removed few unused code
Thirunarayanan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -400,16 +400,18 @@ bool Table::copy(ds_ctxt_t *ds, bool is_index, unsigned thread_num) { | |
| for (ulonglong block= 0 ; ; block++) { | ||
| size_t length = m_cap.block_size; | ||
| if (is_index) { | ||
| if ((error= aria_read_index( | ||
| partition.m_index_file, &m_cap, block, copy_buffer) == | ||
| HA_ERR_END_OF_FILE)) | ||
| break; | ||
| error= aria_read_index(partition.m_index_file, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| &m_cap, block, | ||
| copy_buffer); | ||
|
dr-m marked this conversation as resolved.
|
||
| } else { | ||
| if ((error= aria_read_data( | ||
| partition.m_data_file, &m_cap, block, copy_buffer, &length) == | ||
| HA_ERR_END_OF_FILE)) | ||
| break; | ||
| error= aria_read_data(partition.m_data_file, | ||
| &m_cap, block, | ||
| copy_buffer, &length); | ||
| } | ||
|
|
||
| if (error == HA_ERR_END_OF_FILE) | ||
| break; | ||
|
|
||
| if (error) { | ||
| msg(thread_num, "error: aria_read %s failed: %d", | ||
| is_index ? "index" : "data", error); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| /* Copyright (c) 2017, 2024, Oracle and/or its affiliates. | ||
|
|
||
| This program is free software; you can redistribute it and/or modify | ||
| it under the terms of the GNU General Public License, version 2.0, | ||
| as published by the Free Software Foundation. | ||
|
|
||
| This program is designed to work with certain software (including | ||
| but not limited to OpenSSL) that is licensed under separate terms, | ||
| as designated in a particular file or component or in included license | ||
| documentation. The authors of MySQL hereby grant you an additional | ||
| permission to link the program and your derivative works with the | ||
| separately licensed software that they have either included with | ||
| the program or referenced in the documentation. | ||
|
|
||
| This program is distributed in the hope that it will be useful, | ||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| GNU General Public License, version 2.0, for more details. | ||
|
|
||
| You should have received a copy of the GNU General Public License | ||
| along with this program; if not, write to the Free Software | ||
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ | ||
|
|
||
| /** | ||
| @file mysql/plugin_clone.h | ||
| API for clone plugin | ||
| */ | ||
|
|
||
| #ifndef MYSQL_PLUGIN_CLONE_INCLUDED | ||
| #define MYSQL_PLUGIN_CLONE_INCLUDED | ||
|
|
||
| #include "my_global.h" | ||
| #include "violite.h" | ||
| #include "plugin.h" | ||
|
|
||
| /** Clone plugin interface version */ | ||
| #define MariaDB_CLONE_INTERFACE_VERSION 0x0100 | ||
|
|
||
| /** | ||
| The descriptor structure for the plugin, that is referred from | ||
| st_mysql_plugin. | ||
| */ | ||
|
|
||
| struct Mysql_clone { | ||
| /** clone plugin interface version */ | ||
| int interface_version; | ||
|
|
||
| /** Clone database from local server. | ||
| @param[in] thd server thread handle | ||
| @param[in] data_dir cloned data directory | ||
| @return error code, 0 on success */ | ||
| int (*clone_local)(THD *thd, const char *data_dir); | ||
|
|
||
| /** Clone database from remote server. | ||
| @param[in] thd server thread handle | ||
| @param[in] remote_host remote host IP address | ||
| @param[in] remote_port remote server port | ||
| @param[in] remote_user remote user name | ||
| @param[in] remote_passwd remote user's password | ||
| @param[in] data_dir cloned data directory | ||
| @param[in] ssl_mode ssl mode for remote connection | ||
| @return error code, 0 on success */ | ||
| int (*clone_client)(THD *thd, const char *remote_host, uint remote_port, | ||
| const char *remote_user, const char *remote_passwd, | ||
| const char *data_dir, int ssl_mode); | ||
|
|
||
| /** Clone database and send to remote clone client. | ||
| @param[in] thd server thread handle | ||
| @param[in] socket network socket to remote client | ||
| @return error code, 0 on success */ | ||
| int (*clone_server)(THD *thd, MYSQL_SOCKET socket); | ||
| }; | ||
|
|
||
| /** Create clone handle to access the clone interfaces from server. | ||
| Called when Clone plugin is installed. | ||
| @param[in] plugin_name clone plugin name | ||
| @return error code */ | ||
| int clone_handle_create(const char *plugin_name); | ||
|
|
||
| /** Drop clone handle. Called when Clone plugin is uninstalled. | ||
| @return error code */ | ||
| int clone_handle_drop(); | ||
|
|
||
| /** Check if it is safe to uninstall clone plugin. | ||
| @param[in,out] plugin_info plugin | ||
| @return error code */ | ||
| int clone_handle_check_drop(MYSQL_PLUGIN plugin_info); | ||
|
|
||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.