1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

MDEV-4506: Parallel replication.

Do not update relay-log.info and master.info on disk after every event
when using GTID mode:

 - relay-log.info and master.info are not crash-safe, and are not used
   when slave restarts in GTID mode (slave connects with GTID position
   instead and immediately rewrites the file with the new, correct
   information found).

 - When using GTID and parallel replication, the position in
   relay-log.info is misleading at best and simply wrong at worst.

 - When using parallel replication, the fact that every single
   transaction needs to do a write() syscall to the same file is
   likely to become a serious bottleneck.

The files are still written at normal slave stop.

In non-GTID mode, the files are written as normal (this is needed to
be able to restart after slave crash, even if such restart is then not
crash-safe, no change).
This commit is contained in:
unknown
2013-10-25 12:56:12 +02:00
parent 7a22b6a655
commit 80d0dd7bab
3 changed files with 13 additions and 10 deletions

View File

@@ -14,10 +14,7 @@
following transactions, so slave binlog position will be correct.
And all the retry logic for temporary errors like deadlock.
- In GTID replication, we should not need to update master.info and
relay-log.info on disk at all except at slave thread stop. They are not
used to know where to restart, the updates are not crash-safe, and it
could negatively affect performance.
- Retry of failed transactions is not yet implemented for the parallel case.
- All the waits (eg. in struct wait_for_commit and in
rpl_parallel_thread_pool::get_thread()) need to be killable. And on kill,
@@ -29,8 +26,6 @@
slave rolls back the transaction; parallel execution needs to be able
to deal with this wrt. commit_orderer and such.
See Format_description_log_event::do_apply_event().
- Retry of failed transactions is not yet implemented for the parallel case.
*/
struct rpl_parallel_thread_pool global_rpl_thread_pool;