Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-7198

[PATCH] status variable for Slave_skipped_errors

Details

    Description

      From MDEV-6457 was a suggestion for a status variable to report slave_skipped_errors.

      Wasn't sure if I needed a mutex around this to account for potential parallel replication error faults occurring at the same time (probably yes).

      attached patch against 10.0.15-trunk

      Attachments

        Issue Links

          Activity

            Pushed to 10.1.4, thanks Daniel!

            knielsen Kristian Nielsen added a comment - Pushed to 10.1.4, thanks Daniel!

            I wonder if it's been done on purpose that FLUSH STATUS does not reset the value. Either way is reasonable, so I don't have a strong opinion about it, just something to note.

            elenst Elena Stepanova added a comment - I wonder if it's been done on purpose that FLUSH STATUS does not reset the value. Either way is reasonable, so I don't have a strong opinion about it, just something to note.
            danblack Daniel Black added a comment -

            really? it isn't of type SHOW_LONG_NOFLUSH so it looks like sql_show.cc:reset_status_vars would reset this like other LONG global status variables.

            danblack Daniel Black added a comment - really? it isn't of type SHOW_LONG_NOFLUSH so it looks like sql_show.cc:reset_status_vars would reset this like other LONG global status variables.

            And yet..

            [connection master]
            create table t1 (pk int primary key);
            connection slave;
             
            ############### Initial status
            show global status like 'Slave_skipped_errors';
            Variable_name	Value
            Slave_skipped_errors	0
            show global status like 'Table_locks_immediate';
            Variable_name	Value
            Table_locks_immediate	44
            ############### 
             
            insert into t1 values (1);
            connection master;
            insert into t1 values (1);
            connection slave;
             
            ############### After one skipped error
            show global status like 'Slave_skipped_errors';
            Variable_name	Value
            Slave_skipped_errors	1
            show global status like 'Table_locks_immediate';
            Variable_name	Value
            Table_locks_immediate	47
            ############### 
             
            flush status;
             
            ############### Locks are flushed, but the skipped error isn't
            show global status like 'Slave_skipped_errors';
            Variable_name	Value
            Slave_skipped_errors	1
            show global status like 'Table_locks_immediate';
            Variable_name	Value
            Table_locks_immediate	0
            ############### 
             
            connection master;
            drop table t1;
            connection slave;
            connection master;

            elenst Elena Stepanova added a comment - And yet.. [connection master] create table t1 (pk int primary key); connection slave;   ############### Initial status show global status like 'Slave_skipped_errors'; Variable_name Value Slave_skipped_errors 0 show global status like 'Table_locks_immediate'; Variable_name Value Table_locks_immediate 44 ###############   insert into t1 values (1); connection master; insert into t1 values (1); connection slave;   ############### After one skipped error show global status like 'Slave_skipped_errors'; Variable_name Value Slave_skipped_errors 1 show global status like 'Table_locks_immediate'; Variable_name Value Table_locks_immediate 47 ###############   flush status;   ############### Locks are flushed, but the skipped error isn't show global status like 'Slave_skipped_errors'; Variable_name Value Slave_skipped_errors 1 show global status like 'Table_locks_immediate'; Variable_name Value Table_locks_immediate 0 ###############   connection master; drop table t1; connection slave; connection master;
            danblack Daniel Black added a comment -

            ah type SHOW_LONGLONG for Slave_skipped_errors and only SHOW_LONG get reset.

            I guess someone made a decision a while ago that big vars weren't to be reset.

            well noted.

            danblack Daniel Black added a comment - ah type SHOW_LONGLONG for Slave_skipped_errors and only SHOW_LONG get reset. I guess someone made a decision a while ago that big vars weren't to be reset. well noted.

            People

              knielsen Kristian Nielsen
              danblack Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.