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

Fix bug 1644174 (Test rpl.rpl_init_slave_errors is unstable) #1183

Merged
merged 1 commit into from
Nov 23, 2016

Conversation

laurynas-biveinis
Copy link
Contributor

Add missing slave I/O thread stop sync to the testcase.

http://jenkins.percona.com/job/percona-server-5.5-param/1450/

Not a GCA because of https://bugs.launchpad.net/percona-server/+bug/1638897 fix dependency

Add missing slave I/O thread stop sync to the testcase.
Copy link
Collaborator

@percona-ysorokin percona-ysorokin left a comment

Choose a reason for hiding this comment

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

LGTM

@laurynas-biveinis laurynas-biveinis merged commit d7eacc9 into percona:5.5 Nov 23, 2016
@laurynas-biveinis laurynas-biveinis deleted the bug1644174-5.5 branch November 23, 2016 13:54
inikep added a commit to inikep/percona-server that referenced this pull request Apr 16, 2024
…-sync slave (percona#1006) (percona#1006)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-144

Reference Patch: facebook/mysql-5.6@cc4e803
Reference Patch: facebook/mysql-5.6@aad3ce2a54e
Reference Patch: facebook/mysql-5.6@b42b911fa15

---------- facebook/mysql-5.6@cc4e803 ----------

Send events to async slaves after ACKed by at least one semi-sync slave
Added a new mysql variable `wait_for_semi_sync_ack` to control
sending binlog events to async slaves. When this variables is set,
events are sent to async slave only after it is ACKed by at least one
semi-sync slave (if any).

Originally Reviewed By: Tema

---------- facebook/mysql-5.6@aad3ce2a54e ----------

Fixed rpl_wait_for_semi_sync_ack
Following changes are made to fix the feature
 - Condition variable is registered in dump thread's THD before waiting so that
   the thread can respond to kill command
 - rpl_wait_for_semi_sync_ack is respected only when semi-sync master is enabled
   (i.e rpl_semi_sync_master_enabled = 1)
 - Added a status variable Rpl_semi_sync_master_ack_waits which counts the
   number of times we waited for an ACK (useful for benchmarking)

Originally Reviewed By: hermanlee

---------- facebook/mysql-5.6@b42b911fa15 ----------

Fix rpl_wait_for_semi_sync_ack feature
Fixed the following:
1. Initializing last acked position to what is retrived from engine during
server startup. This makes sure that lagging async slaves are able to catchup
until the last acked position after master restarts.
2. Resetting last acked posistion when `RESET MASTER` is issued. This makes sure
that after the binlogs are reset we wait for acks.
3. Signalling/updating last acked positions only on events that were actually
acked by the semi-sync slave (like the Xid event of the last trx in a group
commit). This is done by signalling inside of the plugin
(ReplSemiSyncMaster::reportReplyBinlog).
4. Signalling/updating on trxs skipped on semi-sync slave connection while
searching for first gtid connection

Originally Reviewed By: hermanlee

--------------------------------------------------------------------

Wrapping last semi-sync acked pos in std::atomic to avoid locking in some scenarios

We'll now lock the mutex only if we need to wait for last acked
pos to update. Otherwise, we just check the current dump thread pos
against the last acked pos atomically and if current is less that last
acked we sent the event without locking the mutex.
--------------------------------------------------------------------

Pull Request resolved: facebook/mysql-5.6#1006

Differential Revision: D16267709

Pulled By: abhinav04sharma

---------------------------------------------------------------------

Fix LLVM codegen for struct st_filenum_pos atomic operations (percona#1183)

Summary:
LLVM has an issue where atomic operations on a struct with 32-bit fields are
compiled using libatomic library calls instead of direct assembly, as if the
whole struct were 32-bit aligned, i.e. its objects could cross machine word
boundary: https://bugs.llvm.org/show_bug.cgi?id=45055.

Workaround this issue by aligning the first 32-bit field at 64 bits.

This allows not linking mysys with libatomic.

Pull Request resolved: facebook/mysql-5.6#1183

Reviewed By: abhinav04sharma

Differential Revision: D34379183

Pulled By: hermanlee
inikep added a commit to inikep/percona-server that referenced this pull request Apr 17, 2024
…-sync slave (percona#1006) (percona#1006)

Summary:
Jira issue: https://jira.percona.com/browse/FB8-144

Reference Patch: facebook/mysql-5.6@cc4e803
Reference Patch: facebook/mysql-5.6@aad3ce2a54e
Reference Patch: facebook/mysql-5.6@b42b911fa15

---------- facebook/mysql-5.6@cc4e803 ----------

Send events to async slaves after ACKed by at least one semi-sync slave
Added a new mysql variable `wait_for_semi_sync_ack` to control
sending binlog events to async slaves. When this variables is set,
events are sent to async slave only after it is ACKed by at least one
semi-sync slave (if any).

Originally Reviewed By: Tema

---------- facebook/mysql-5.6@aad3ce2a54e ----------

Fixed rpl_wait_for_semi_sync_ack
Following changes are made to fix the feature
 - Condition variable is registered in dump thread's THD before waiting so that
   the thread can respond to kill command
 - rpl_wait_for_semi_sync_ack is respected only when semi-sync master is enabled
   (i.e rpl_semi_sync_master_enabled = 1)
 - Added a status variable Rpl_semi_sync_master_ack_waits which counts the
   number of times we waited for an ACK (useful for benchmarking)

Originally Reviewed By: hermanlee

---------- facebook/mysql-5.6@b42b911fa15 ----------

Fix rpl_wait_for_semi_sync_ack feature
Fixed the following:
1. Initializing last acked position to what is retrived from engine during
server startup. This makes sure that lagging async slaves are able to catchup
until the last acked position after master restarts.
2. Resetting last acked posistion when `RESET MASTER` is issued. This makes sure
that after the binlogs are reset we wait for acks.
3. Signalling/updating last acked positions only on events that were actually
acked by the semi-sync slave (like the Xid event of the last trx in a group
commit). This is done by signalling inside of the plugin
(ReplSemiSyncMaster::reportReplyBinlog).
4. Signalling/updating on trxs skipped on semi-sync slave connection while
searching for first gtid connection

Originally Reviewed By: hermanlee

--------------------------------------------------------------------

Wrapping last semi-sync acked pos in std::atomic to avoid locking in some scenarios

We'll now lock the mutex only if we need to wait for last acked
pos to update. Otherwise, we just check the current dump thread pos
against the last acked pos atomically and if current is less that last
acked we sent the event without locking the mutex.
--------------------------------------------------------------------

Pull Request resolved: facebook/mysql-5.6#1006

Differential Revision: D16267709

Pulled By: abhinav04sharma

---------------------------------------------------------------------

Fix LLVM codegen for struct st_filenum_pos atomic operations (percona#1183)

Summary:
LLVM has an issue where atomic operations on a struct with 32-bit fields are
compiled using libatomic library calls instead of direct assembly, as if the
whole struct were 32-bit aligned, i.e. its objects could cross machine word
boundary: https://bugs.llvm.org/show_bug.cgi?id=45055.

Workaround this issue by aligning the first 32-bit field at 64 bits.

This allows not linking mysys with libatomic.

Pull Request resolved: facebook/mysql-5.6#1183

Reviewed By: abhinav04sharma

Differential Revision: D34379183

Pulled By: hermanlee
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.

2 participants