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

Pxc 4469 sst clone #1961

Draft
wants to merge 45 commits into
base: 8.0
Choose a base branch
from
Draft

Conversation

Tusamarco
Copy link

Adding preview POC for the Clone method for SST.
The script is based on the one from codership but then need to refactor almost in full to have it working with PXC.
birdeye flow

#              ┌──────────────────┐                      
#              │  Joiner starts   │                      
#              └────────┬─────────┘                      
#              ┌────────▼─────────┐                      
#              │open NetCat listnr│                      
#              └────────┬─────────┘                      
#              ┌────────▼─────────┐                      
#              │Send message to Dn│                      
#              └────────┬─────────┘                      
#              ┌────────▼─────────┐                      
#              │Donor decide IST  │                      
#              │or SST. Send msg  │                      
#              │through NC and    │                      
#              │waits for Joiner  │                      
#              │Clone instance    │                      
#              └────────┬─────────┘                      
#              ┌────────▼─────────┐                      
#              │Joiner get IST    │                      
#              │or SST.If IST     │                      
#              │Bypass all and    │                      
#              │Wait for IST.     │                      
#              │SST Start clone   │                      
#              │Instance and wait │                      
#              │for donor to clone│                      
#              └─────────┬────────┘                      
#              ┌─────────▼─────────────┐                 
#              │Clone process is       │                 
#              │reported.              │                 
#              │When done Dn waits     │                 
#              │Joiner close instance  │                 
#              │And performs 3 restarts│                 
#              └──────────┬────────────┘                 
#              ┌──────────▼──────────────┐               
#              │1) To fix dictionary     │               
#              │2) To recover position   │               
#              │3) Final cleanup         │               
#              └──────────┬──────────────┘               
#              ┌──────────▼──────────────┐               
#              │Send final ready signal  │               
#              │Waits for IST            │               
#              └─────────────────────────┘               

@it-percona-cla
Copy link

it-percona-cla commented Oct 7, 2024

CLA assistant check
All committers have signed the CLA.

@Tusamarco
Copy link
Author

I have a question...
the two file wsrep_clone and wsrep_common_clone are not copied over when I do make install where is that defined?
@kamil-holubicki @venkatesh-prasad-v

mysql-test/suite/galera/t/galera_sst_clone.cnf Outdated Show resolved Hide resolved
mysql-test/suite/galera/t/galera_sst_clone.test Outdated Show resolved Hide resolved
scripts/wsrep_sst_common_clone.sh Outdated Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Outdated Show resolved Hide resolved
scripts/mysql_system_users.sql Show resolved Hide resolved
sql/wsrep_sst.cc Outdated Show resolved Hide resolved
scripts/mysql_system_users.sql Show resolved Hide resolved
sql/wsrep_sst.cc Outdated Show resolved Hide resolved
scripts/wsrep_sst_common_clone.sh Outdated Show resolved Hide resolved
scripts/wsrep_sst_common_clone.sh Outdated Show resolved Hide resolved
@kamil-holubicki
Copy link
Contributor

As we spoke today, we need to test it with encrypted tables and keyring component/plugin enabled

- removed the need to perform the restart to clean up the final instance.
- use wsrep-sst-receive-address to get IP and port definition
- use one port for Netcat and MySQL
- some code cleanup
- Add message suppression when reporting clone Status %. It will be reported only if different from previous value.
@Tusamarco
Copy link
Author

@kamil-holubicki

==============================================================================
                  TEST NAME                       RESULT  TIME (ms) COMMENT
------------------------------------------------------------------------------
[ 33%] galera.galera_sst_clone 'enc_off'         [ pass ]  28381
[ 66%] galera.galera_sst_clone 'enc_on'          [ pass ]  28789
[100%] shutdown_report                           [ pass ]       
------------------------------------------------------------------------------
The servers were restarted 1 times
The servers were reinitialized 0 times
Spent 57.170 of 168 seconds executing testcases

Completed: All 3 tests were successful.

If you outline what kind of operation are you expecting to test when talking about data encryption I can see how clone deal with it. Also if think this can be step 2

scripts/wsrep_sst_clone.sh Show resolved Hide resolved
mysql-test/suite/galera/r/galera_sst_clone.result Outdated Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Outdated Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Outdated Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Outdated Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Show resolved Hide resolved
mysql-test/suite/galera/t/galera_sst_clone.cnf Outdated Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Outdated Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Outdated Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Outdated Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Outdated Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Outdated Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Show resolved Hide resolved
sql/wsrep_sst.cc Show resolved Hide resolved
Tusamarco and others added 5 commits December 3, 2024 16:29
Few minor refactoring to accomodate comments on PR
- add check on Donor message to ensure message is complete before continue
* Add code in wsrep_sst.cc to handle the remote usr/pw pair and pass it to STDIN
- modify bash script accordingly
sql/wsrep_sst.cc Outdated Show resolved Hide resolved
sql/wsrep_sst.cc Show resolved Hide resolved
sql/wsrep_sst.cc Outdated Show resolved Hide resolved
sql/wsrep_sst.cc Outdated Show resolved Hide resolved
--
-- 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
-- This program is also distributed with certain software (including
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment was not addressed

-- 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.
-- separately licensed software that they have included with MySQL.
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment was not addressed

scripts/wsrep_sst_common.sh Outdated Show resolved Hide resolved
sql/wsrep_sst.cc Outdated Show resolved Hide resolved
mysql-test/suite/galera/r/galera_sst_clone.result Outdated Show resolved Hide resolved
mysql-test/suite/galera/r/galera_sst_clone.result Outdated Show resolved Hide resolved
mysql-test/suite/galera/t/galera_sst_clone.test Outdated Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Show resolved Hide resolved
sql/wsrep_sst.cc Outdated Show resolved Hide resolved
scripts/wsrep_sst_clone.sh Show resolved Hide resolved
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.

5 participants