# Wsrep: deleting row for write-set

**URL:** <https://forums.percona.com/t/wsrep-deleting-row-for-write-set/14512>\
**Category:** Percona XtraDB Cluster\
**Created:** [February 21, 2022, 10:13pm UTC](https://forums.percona.com/t/wsrep-deleting-row-for-write-set/14512 "2022-02-21T22:13:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [February 21, 2022, 10:13pm UTC](https://forums.percona.com/t/wsrep-deleting-row-for-write-set/14512/1 "2022-02-21T22:13:59Z")

</div>

I have a multi master cluster but I am only writing to node 1. Should I see `wsrep: deleting row for write-set` on node 2? I do however use stored procedures that insert and delete to temp tables, could that cause the wsrep statements?

---

<div class="post-metadata">

**Author:** ![svetasmirnova](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/svetasmirnova/32/21_2.png) [@svetasmirnova](https://forums.percona.com/u/svetasmirnova)\
**Post date:** [February 22, 2022, 8:21am UTC](https://forums.percona.com/t/wsrep-deleting-row-for-write-set/14512/2 "2022-02-22T08:21:04Z")

</div>

Do you see this message in the pricesslist? If this is a reader note this is absolutely OK, because status indicates that write from the writing node received and read-only node is applying it. See also this post: [Improved wsrep-stages and related instrumentation in Percona XtraDB Cluster - Percona Database Performance Blog](https://www.percona.com/blog/2017/04/24/improved-wsrep-stages-and-related-instrumentation/)

---

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [February 22, 2022, 9:39am UTC](https://forums.percona.com/t/wsrep-deleting-row-for-write-set/14512/3 "2022-02-22T09:39:34Z")

</div>

yes it was in the processlist however it was blocking other transactions.  
From `SHOW ENGINE innodb status` I get the below. And the delete row was blocking other transactions.

```auto
---TRANSACTION 421192568866568, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 824034113, ACTIVE 1891 sec updating or deleting
mysql tables in use 1, locked 1
37315 lock struct(s), heap size 8069240, 8015767 row lock(s), undo log entries 8007988
MySQL thread id 16, OS thread handle 139717569754880, query id 94171565 wsrep: deleting row for write-set (1123372)

```

More from processlist.

```auto
system user| |NULL|Query|4533 |wsrep: committed write set (1123370)|NULL|1959074|0|0|
system user| |garage|Query|4597|wsrep: deleting row for write-set (1123372) |NULL|4|0|0|
system user| |NULL|Query|4639|wsrep: committed write set (1123356)|NULL|1982240|0|0|
system user| |NULL|Query|4642|wsrep: committed write set (1123354)|NULL|1982555|0|0|
root|localhost:34162|datastore|Query|4439|wsrep: initiating TOI for write set (-1)|drop table if exists file_search|4438597|0|0|
root|localhost:35530|datastore|Query|4388|wsrep: initiating TOI for write set (-1)|drop table if exists file_search|4387752|0|0|
root|localhost:36464|datastore|Query|4415|wsrep: initiating TOI for write set (-1)|drop table if exists file_search|4414853 |0|0|
root|localhost:47886|datastore|Query|4434|wsrep: initiating TOI for write set (-1)|drop table if exists file_search|4433324|0|0|

```

---

<div class="post-metadata">

**Author:** ![svetasmirnova](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/svetasmirnova/32/21_2.png) [@svetasmirnova](https://forums.percona.com/u/svetasmirnova)\
**Post date:** [February 22, 2022, 11:20am UTC](https://forums.percona.com/t/wsrep-deleting-row-for-write-set/14512/4 "2022-02-22T11:20:13Z")

</div>

Do you see this on the read-only node?

---

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [February 22, 2022, 2:32pm UTC](https://forums.percona.com/t/wsrep-deleting-row-for-write-set/14512/5 "2022-02-22T14:32:05Z")

</div>

Yes those came from the read only node. Technically someone can write to it, but no one is. Because I control all of the scripts.

---

<div class="post-metadata">

**Author:** ![svetasmirnova](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/svetasmirnova/32/21_2.png) [@svetasmirnova](https://forums.percona.com/u/svetasmirnova)\
**Post date:** [February 23, 2022, 12:32am UTC](https://forums.percona.com/t/wsrep-deleting-row-for-write-set/14512/6 "2022-02-23T00:32:35Z")

</div>

In this case, this is absolutely OK. This status means that the node received an update from the writer and applies it.

To find out why this particular DELETE operation takes so long time you need to investigate which exact changes your writer node sent to its peers.

---

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [February 24, 2022, 11:43am UTC](https://forums.percona.com/t/wsrep-deleting-row-for-write-set/14512/7 "2022-02-24T11:43:43Z")

</div>

Where can I find that information at? Is there a table that catalogs that information. I have a lot of DML statements so it would be almost impossible without shutting down all crons and enabling them a day at a time.

---

<div class="post-metadata">

**Author:** ![svetasmirnova](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/svetasmirnova/32/21_2.png) [@svetasmirnova](https://forums.percona.com/u/svetasmirnova)\
**Post date:** [February 24, 2022, 11:59pm UTC](https://forums.percona.com/t/wsrep-deleting-row-for-write-set/14512/8 "2022-02-24T23:59:58Z")

</div>

You can check binary logs or general query log on the writer node if enabled.
