[MDEV-15242] Poor RBR update performance with partitioned tables Created: 2018-02-07  Updated: 2020-08-25  Resolved: 2018-06-26

Status: Closed
Project: MariaDB Server
Component/s: Partitioning, Replication, Storage Engine - InnoDB
Affects Version/s: 10.0.34, 10.1.31
Fix Version/s: 10.0.36, 10.1.35, 10.2.17, 10.3.8

Type: Bug Priority: Critical
Reporter: Geoff Montee (Inactive) Assignee: Andrei Elkin
Resolution: Fixed Votes: 3
Labels: innodb, partitioning, upstream

Attachments: Zip Archive replication_issue_test_suite.zip    
Issue Links:
Relates
relates to MDEV-15223 Document that InnoDB's native partiti... Closed

 Description   

This is related to the following upstream bug:

https://bugs.mysql.com/bug.php?id=73648

When binlog_format=ROW is set and a partitioned table is updated, the update seems to perform much slower than an equivalent update of a non-partitioned table.

Some MTR tests have been contributed to demonstrate this problem. They are in the attached zip archive. The results were reported as the following:

mariadb-10.1.31

bug.test 'innodb_plugin,row' [ pass ] 114205
bug.test_no_partition 'innodb_plugin,row' [ pass ] 22101

bug.test 'row,xtradb' [ pass ] 429822
bug.test_no_partition 'row,xtradb' [ pass ] 65829

mariadb 10.2.12

bug.test 'innodb,row' [ pass ] 161739
bug.test_no_partition 'innodb,row' [ pass ] 28501

mysql-5.6.39

bug.test [ pass ] 158594
bug.test_no_partition [ pass ] 20350

mysql 5.7.21

bug.test [ pass ] 37490
bug.test_no_partition [ pass ] 26441

MySQL 5.7 most likely performs better because of the introduction of native partitioning. Native partitioning was removed from MariaDB 10.2 during the 5.7 InnoDB merge. See MDEV-15223.



 Comments   
Comment by Andrei Elkin [ 2018-06-19 ]

Sergei, hello.

Find below is a patch header. [I had to struggle for few hours
to clear out the mysql's patch which did not run at once through
my error to build properly.]

Cheers,

Andrei

From: andrei.elkin@pp.inet.fi
Subject: [Commits] 37b432c1d59: MDEV-15242 Poor RBR update performance with
partitioned tables
To: commits@mariadb.org
Date: Tue, 19 Jun 2018 18:26:19 +0300 (19 seconds ago)
Reply-To: maria-developers@lists.launchpad.net

revision-id: 37b432c1d59e66b742f97a280cae7784d85e62ec (mariadb-10.0.35-41-g37b432c1d59)
parent(s): d2e1ed8b936a78ceeec0e64231997d7ed18a4daf
author: Andrei Elkin
committer: Andrei Elkin
timestamp: 2018-06-19 18:14:47 +0300
message:

MDEV-15242 Poor RBR update performance with partitioned tables

Observed and described
partitioned engine execution time difference
between master and slave was caused by excessive invocation
of base_engine::rnd_init which was done also for partitions
uninvolved into Rows-event operation.
The bug's slave slowdown therefore scales with the number of partitions.

Fixed with applying an upstream patch.

References:
----------
https://bugs.mysql.com/bug.php?id=73648
Bug#25687813 REPLICATION REGRESSION WITH RBR AND PARTITIONED TABLES

Comment by Andrei Elkin [ 2018-06-26 ]

The patch is pushed as 28e1f1453f1.

Comment by Chris Calender (Inactive) [ 2018-06-28 ]

Elkin or Anyone else who might know:

Will this be fixed in the next 10.1, which will be 10.1.35 (tentatively scheduled for 7/27/18)?

Many thanks in advance.

Comment by Julien Fritsch [ 2018-06-28 ]

I'mm 90% sure yes ccalender

Generated at Thu Feb 08 08:19:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.