Status Variables for Fill Factor of gcache

Bug #1185689 reported by Jervin R
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Expired
Undecided
Unassigned

Bug Description

I've been looking for a way to properly size gcache.size and determine for how long a node can stay down without doing an SST when it comes back online. However, Galera does not expose any of this easily. So I am filing a feature request here, maybe expose 3 values like fill in bytes and lowest and highest commited trx in gcache?

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

Gcache exposes seqno_max and seqno_locked. The transaction mapping is done at higher levels I think.

However, I see

        std::ostringstream pstream;

        pstream
            << "* GCache data file *" << std::endl
            << "--------------------" << std::endl
            << "Version : " << header[HEADER_VERSION] << std::endl
            << "Size : " << header[FILE_SIZE] << "bytes" << std::endl
            << "Closed : " << (header[FILE_OPEN]?"no":"yes") << std::endl
            << "Data offset : " << header[DATA_OFFSET] << std::endl
            << "First buffer : " << header[FIRST_OFFSET] << std::endl
            << "Next buffer : " << header[NEXT_OFFSET] << std::endl
            << "Min. seqno : " << header[SEQNO_MIN] << std::endl
            << "Max. seqno : " << header[SEQNO_MAX] << std::endl
            << "Ordered buffers : " << (header[SEQNO_MAX] - header[SEQNO_MIN]) << std::endl
            << "--------------------" << std::endl;

        strncpy (preamble, pstream.str().c_str(), PREAMBLE_LEN - 1);
        preamble[PREAMBLE_LEN - 1] = '\0';

which is unused, probably can be used to dump to log.

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

Jervin, since at the moment GCache is size-based, there can be no straightforward way to tell for how long it will last - clearly it depends on the replication rate. And that not only varies from site to site but also from time to time. So yes, it is not easy, but it probably cannot be.

I'd suggest that the right approach here should be not "how many hours will it hold", but "at what size using SST would be preferable to IST".

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

@Alex,

Relating to https://bugs.launchpad.net/galera/+bug/1252460, is it possible to make RingBuffer::preamble_write to be used to dump gcache metadata? if possible under COM_DEBUG (so it goes to stderr).

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

Raghu, it is of course. But what are you actually trying to achieve?

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

@Alex,

It would help to get seqno (and other info) from gcache. This
would also help to calculate replication rate (by measuring twice
between a time period), though lp:1252460 should also help here. Also, on an offline host, getting
metadata from gcache may help.

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

> It would help to get seqno (and other info) from gcache. This would also help to calculate replication rate (by measuring twice between a time period)

Why would you go into gcache preamble for that? Isn't status variable enough?

The main confusion for me here is: are you talking about updating gcache preamble in runtime?

Changed in percona-xtradb-cluster:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Percona XtraDB Cluster because there has been no activity for 60 days.]

Changed in percona-xtradb-cluster:
status: Incomplete → Expired
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/PXC-1364

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.