[MDEV-8735] galera rsync sst - tar of binlog to file before transfer waste of IO and space Created: 2015-09-03 Updated: 2020-12-07 Resolved: 2020-12-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera SST |
| Affects Version/s: | 10.0.21-galera |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Daniel Black | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | beginner-friendly, galera | ||
| Environment: |
rhel6 |
||
| Issue Links: |
|
||||||||
| Description |
|
started sst transfer. donor ran out of space due to the created wsrep_sst_binlog.tar rather than creating the tar can the rsync method just add the binlog index files to the filter? https://github.com/MariaDB/server/blob/10.0-galera/scripts/wsrep_sst_rsync.sh#L159 |
| Comments |
| Comment by Daniel Black [ 2015-09-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
rsync has a --include-from= which could point directly at the index file perhaps. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2015-09-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Work in progress. patch wasn't sufficient to copy binlogs (or need it on both ends of connection).
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nirbhay Choubey (Inactive) [ 2015-11-19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
danblack This is a good idea. A few things to consider:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2015-11-20 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
for compatibility to an older joiner: On the donor side I can see this done with the batch mode of rsync. rsync --write-batch created a file that can can be effectively used by the protocol. The trick would be to getting process generating the same format, a header, the tar file to standard out, and a footer. So (echo ... ; tar ... : echo ) | rsync .... --read-batch=- , I haven't checked how this plays out with other sync options present. The batch file format looking at the rsync source seem to be exactly what is sent over the wire. I haven't found a good document for the wire protocol (https://code.activestate.com/recipes/577518-rsync-algorithm/ ?). For joiner side, can't see anything plausible using rsync (maybe a process to filter the entire stream, handle the tar separately, and push the rest to rsync --read-batch), handing a tar -x process off a name pipe is too dumb for rsync. But overall, maybe if it can't be done neatly a new rsync sst implementation like rsync_v2 to addresss this and other deficiencies of rsyncv1. Up to you of course. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2018-01-14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Actually, ignore previous, this is a lot easier than I thought. Looking at the current wsrep_sst_rsync method the server creates two module names. There just needs to be a third created for the binlogs. Compatibility:donor:
joiner:
|