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

#1065841 use --skip-write-binlog on mysql upgrade, to avoid breaking … #1006

Closed
wants to merge 1 commit into from
Closed

Conversation

mig5
Copy link

@mig5 mig5 commented Sep 14, 2016

…replication on slaves

@laurynas-biveinis laurynas-biveinis self-assigned this Sep 14, 2016
@laurynas-biveinis
Copy link
Contributor

We have fixed this in #1017, which changes mysql_upgrade option default itself.

inikep pushed a commit to inikep/percona-server that referenced this pull request Apr 23, 2020
…-sync slave (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

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

Pull Request resolved: facebook/mysql-5.6#1006

Reviewed By: abhinav04sharma

Differential Revision: D16267709

Pulled By: abhinav04sharma

fbshipit-source-id: d3e7f43ee14
inikep pushed a commit to inikep/percona-server that referenced this pull request Feb 24, 2021
…-sync slave (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

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

Pull Request resolved: facebook/mysql-5.6#1006

Reviewed By: abhinav04sharma

Differential Revision: D16267709

Pulled By: abhinav04sharma

fbshipit-source-id: d3e7f43ee14
inikep pushed a commit to inikep/percona-server that referenced this pull request Nov 15, 2021
…-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

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

Pull Request resolved: facebook/mysql-5.6#1006

Differential Revision: D16267709 (facebook/mysql-5.6@46f12b8)

Pulled By: abhinav04sharma

fbshipit-source-id: a09f35e9d4d
ldonoso pushed a commit to ldonoso/percona-server that referenced this pull request Mar 15, 2022
…-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
ldonoso pushed a commit to ldonoso/percona-server that referenced this pull request Mar 15, 2022
…-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
ldonoso pushed a commit to ldonoso/percona-server that referenced this pull request Mar 18, 2022
…-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
ldonoso pushed a commit to ldonoso/percona-server that referenced this pull request Apr 12, 2022
…-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
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