# Anyone using parallel replication with only one logical db for a large mission critical use case?

**URL:** <https://forums.percona.com/t/anyone-using-parallel-replication-with-only-one-logical-db-for-a-large-mission-critical-use-case/8787>\
**Category:** Percona Server for MySQL 8.0\
**Created:** [January 14, 2021, 6:58pm UTC](https://forums.percona.com/t/anyone-using-parallel-replication-with-only-one-logical-db-for-a-large-mission-critical-use-case/8787 "2021-01-14T18:58:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vamsi\_P](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vamsi_p/32/2549_2.png) [@Vamsi\_P](https://forums.percona.com/u/Vamsi_P)\
**Post date:** [January 14, 2021, 6:58pm UTC](https://forums.percona.com/t/anyone-using-parallel-replication-with-only-one-logical-db-for-a-large-mission-critical-use-case/8787/1 "2021-01-14T18:58:45Z")

</div>

Hi Folks,

I know of companies using multiple logical dbs in same mysql instance ( like create database db1, create database db2 etc) for parallel replication since 5.6.

In 5.7, new feature was added to be able to parallelize replication within one logical db.

We tried it once **more than a year ago** with the following settings

```
slave_parallel_type = LOGICAL_CLOCK
slave_parallel_workers = 20

```

We saw replication broke on slave with this weird error:

```
 Last_Errno: 1755
 Last_Error: Cannot execute the current event group in the parallel mode. Encountered event Gtid, relay-log name ./db4030a-relay-bin.009066, position 73699 which prevents execution of this event group in parallel mode. Reason: The master event is logically timestamped incorrectly..

```

Since that was a new use case anyway, at that time we decided to use multiple logical dbs for parallelizing replication rather than debug the issue.

Now for our main legacy use case still on 5.6, as we migrate to 8.0, we are wondering whether to use parallel replication with just one logical db or try to split the tables into logical dbs.

**If you have a large mission critical use case with hundreds of diverse tables, I would like to know if parallel replication with one logical db is causing any issues for you.**

Thanks!  
Vamsi

---

<div class="post-metadata">

**Author:** ![CTutte](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ctutte/32/1341_2.png) [@CTutte](https://forums.percona.com/u/CTutte)\
**Post date:** [January 14, 2021, 8:32pm UTC](https://forums.percona.com/t/anyone-using-parallel-replication-with-only-one-logical-db-for-a-large-mission-critical-use-case/8787/2 "2021-01-14T20:32:21Z")

</div>

Hi Vamsi,

Replication with one logical db and slave\_parallel\_type = LOGICAL\_CLOCK is considered stable and production ready for large mission critical use cases.

Regarding the issue you got, config and relay logs should be checked to better understand the cause of the error. For example it can be related to this bug report [MySQL Bugs: #89375: Parallel replication always fails with specific workload from sysbench](https://bugs.mysql.com/bug.php?id=89375) related to replicate-same-server-id .  
I suggest using latest version to benefit from latest improvement and bug fixes, and in case you get the same issue again, then you disable parallel replication for a while with the following steps [Last\_SQL\_Error: Cannot execute the current event group in the parallel mode – Databases and Data Technologies](https://georgechilumbu.wordpress.com/2018/05/30/last_sql_error-cannot-execute-the-current-event-group-in-the-parallel-mode/) to restore replication.

As a last comment, when using MTS replication with logical\_clock , parallel replication might be limited depending on writeload and dependencies on master. You can check parallel replication efficiency and calculate optimal number of worker threads following the steps on this blogpost [Estimating potential for MySQL 5.7 parallel replication - Percona Database Performance Blog](https://www.percona.com/blog/2016/02/10/estimating-potential-for-mysql-5-7-parallel-replication/)

---

<div class="post-metadata">

**Author:** ![Vamsi\_P](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vamsi_p/32/2549_2.png) [@Vamsi\_P](https://forums.percona.com/u/Vamsi_P)\
**Post date:** [January 14, 2021, 8:34pm UTC](https://forums.percona.com/t/anyone-using-parallel-replication-with-only-one-logical-db-for-a-large-mission-critical-use-case/8787/3 "2021-01-14T20:34:32Z")

</div>

ok, thanks for prompt response!  
Vamsi
