# How does adding/replacing/decommissioning node affect the SSTables if using TWCS

**URL:** <https://forum.scylladb.com/t/how-does-adding-replacing-decommissioning-node-affect-the-sstables-if-using-twcs/553>\
**Category:** ScyllaDB\
**Tags:** open-source, compaction, twcs\
**Created:** [May 16, 2023, 5:42pm UTC](https://forum.scylladb.com/t/how-does-adding-replacing-decommissioning-node-affect-the-sstables-if-using-twcs/553 "2023-05-16T17:42:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![silentcanon](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@silentcanon](https://forum.scylladb.com/u/silentcanon)\
**Post date:** [May 16, 2023, 5:42pm UTC](https://forum.scylladb.com/t/how-does-adding-replacing-decommissioning-node-affect-the-sstables-if-using-twcs/553/1 "2023-05-16T17:42:22Z")

</div>

There are a couple of documents and articles online that suggest turning off read repair for tables using the time window compaction strategy (TWCS), as it mixes data that should belong to old buckets into new ones, which leads to higher read amplification.

I wonder if some common node operations will cause similar issues. Specifically, adding a node, replacing a dead node, running `nodetool repair`, running `nodetool decommission` or running `nodetool rebuild`.

Also, has ScyllaDB implemented some optimizations regarding TWCS compared to Cassandra?

---

<div class="post-metadata">

**Author:** ![silentcanon](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@silentcanon](https://forum.scylladb.com/u/silentcanon)\
**Post date:** [May 16, 2023, 10:35pm UTC](https://forum.scylladb.com/t/how-does-adding-replacing-decommissioning-node-affect-the-sstables-if-using-twcs/553/2 "2023-05-16T22:35:45Z")

</div>

@Guy could you help with this, thank you

---

<div class="post-metadata">

**Author:** ![Botond\_Denes](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/botond_denes/32/163_2.png) [@Botond\_Denes](https://forum.scylladb.com/u/Botond_Denes)\
**Post date:** [May 17, 2023, 3:43am UTC](https://forum.scylladb.com/t/how-does-adding-replacing-decommissioning-node-affect-the-sstables-if-using-twcs/553/3 "2023-05-17T03:43:40Z")

</div>

All node operations, as well as repair, will split data into buckets appropriate for the TWCS parameters, so neither streaming, nor repair should cause any mixing of data from different buckets. You can repair your TWCS table, and you can add/remove/rebuild nodes, it shouldn’t cause any mixing of old/new data.

---

<div class="post-metadata">

**Author:** ![Guy](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/guy/32/9_2.png) [@Guy](https://forum.scylladb.com/u/Guy)\
**Post date:** [May 17, 2023, 4:33am UTC](https://forum.scylladb.com/t/how-does-adding-replacing-decommissioning-node-affect-the-sstables-if-using-twcs/553/4 "2023-05-17T04:33:47Z")

</div>

You can learn more about TWCS in [this lesson](https://university.scylladb.com/courses/scylla-operations/lessons/compaction-strategies/topic/time-window-compaction-strategy-twcs/).  
[This](https://www.scylladb.com/2023/04/24/tutorial-spring-boot-time-series-data-in-scylladb/) is a hands-on lab where you can see TWCS in action.

AFAIK there are no major differences between TWCS in ScyllaDB and Cassandra.
