xtrabackup_galera_info to grastate.dat

Bug #1181236 reported by Raghavendra D Prabhu
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Triaged
Wishlist
Unassigned
2.1
Triaged
Wishlist
Unassigned
2.2
Triaged
Wishlist
Unassigned
2.3
Triaged
Wishlist
Unassigned

Bug Description

innobackupex --apply-log can be made to generate grastate.dat from xtrabackup_galera_info to avoid manual creation of the file.

Changed in percona-xtradb-cluster:
milestone: none → 5.5.31-25
Revision history for this message
Alex Yurchenko (ayurchen) wrote :

This is sorta dangerous. grastate.dat is not a part of the interface and has no specificaiton. It can change any time. In fact we were planning to add quite a lot of galera state there that xtrabackup can not know about.

What exactly is the use case for that?

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

I thought it would make the backup restore more convenient. But,
again, I wanted opinions on this. Thanks.

Revision history for this message
Jay Janssen (jay-janssen) wrote :

Alex: use-case is avoiding an SST with a backup you already have. Last I knew, wsrep_start_position did NOT work if the grastate.dat wasn't present and at least parseable by Galera. If you can fix that instead, then that's probably sufficient.

Revision history for this message
Jay Janssen (jay-janssen) wrote :

My take is if this bug is fix: https://bugs.launchpad.net/galera/+bug/1112724 then wsrep_recover will build a grastate.dat for us.

Revision history for this message
Alex Yurchenko (ayurchen) wrote :

Jay, yes, that would be a more correct solution.

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Currently as it stands, while restoring from backup, one needs to
manually create grastate.dat from xtrabackup_galera_info which is
not nice. This bug is to automatically generate grastate.dat from
xtrabackup_galera_info at apply-log stage.

Now, technically, wsrep-recover recovers the galera co-ordinates.
So why is grastate.dat needed (or the larger point of collecting galera-info from xtrabackup)? https://bugs.launchpad.net/galera/+bug/1112724 seems to be the issue.

""
Submitting a ---wsrep_start_position when the datadir does not have a grastate.dat not work -- it forces a zero state and SSTs instead.
""

So, if I have a backup without (grastate.dat created manually from xtrabackup_galera_info or grastate.dat already present) wsrep-recover may work but its co-ordinates are not taken.

If lp:1112724 is fixed, then I don't think we need any galera
specific stuff from xtrabackup (--galera-info). Also, assuming no DDL is run,
--no-lock can also be used. There will be no need for
xtrabackup_galera_info either.

@Alexey, any plans on lp:1112724? (seems to be only for galera
3.0 though)

So, in interim and for galera 2.x (PXC 5.x), I think generating grastate.dat from xtrabackup_galera_info may be good, and regarding the specification, since this change is non-invasive one, if it changes (and I presume it changes only in 3.x) then we can remove this.

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

From further investigations that I did, it looks like
xtrabackup_galera_info is not used on joiner other than:

cat ${MAGIC_FILE}

which outputs uuid:seqno.

Also, interestingly, the gtid passed on wsrep_sst_xtrabackup on
donor ends up being the uuid:seqno on the joiner after SST is
done.

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Marking this issue closed since it is not required to create grastate.dat here.

Changed in percona-xtradb-cluster:
milestone: 5.5.32-23.7.6 → none
affects: percona-xtradb-cluster → percona-xtrabackup
Changed in percona-xtrabackup:
milestone: none → 2.1.6
Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

If you are adding this, this will only help with backups of PXC node.

Also, if and when adding this, add it with an option to innobackupex (in addition to --apply-log), otherwise the grastate.dat generated from this will conflict with existing grastate.dat during SST and SST wil break (SST doesn't use grastate.dat).

Changed in percona-xtrabackup:
milestone: 2.1.6 → 2.1.7
Changed in percona-xtrabackup:
milestone: 2.1.7 → 2.1.8
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-1002

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.