---
title: "How Notion handles concurrent editing with CRDTs"
description: "Notion replaced its text-editing system because its former last-write-wins storage could overwrite concurrent edits to the same block, with Offline Mode increasing the risk of lost changes. The new system uses a Conflict-free Replicated Data Type based on Replicated Growable Array, representing inserted text as uniquely identified items, retaining deletions as tombstones, and deterministically ordering concurrent inserts. Peritext-based annotation operations merge rich-text formatting such as bold, italics, and hyperlinks while preserving extendability rules. To keep edits correctly positioned when Enter splits a block, Notion introduced text slices, text slice trees, text instances, and compact search labels for locating slices across blocks. Deployed in July 2025, the system processes millions of CRDT operations per minute and supports Offline Mode and agent collaboration."
---

# How Notion handles concurrent editing with CRDTs

[Notion](https://yomu.fyi/company/notion) · Angelique Nehmzow, Emma Guo · Sep 18, 2026

**Type:** Explainer

## Summary

Notion replaced its text-editing system because its former last-write-wins storage could overwrite concurrent edits to the same block, with Offline Mode increasing the risk of lost changes. The new system uses a Conflict-free Replicated Data Type based on Replicated Growable Array, representing inserted text as uniquely identified items, retaining deletions as tombstones, and deterministically ordering concurrent inserts. Peritext-based annotation operations merge rich-text formatting such as bold, italics, and hyperlinks while preserving extendability rules. To keep edits correctly positioned when Enter splits a block, Notion introduced text slices, text slice trees, text instances, and compact search labels for locating slices across blocks. Deployed in July 2025, the system processes millions of CRDT operations per minute and supports Offline Mode and agent collaboration.

## Context

Notion’s earlier block records used last-write-wins processing, so concurrent edits to the same block could overwrite one another. Separate blocks reduced conflicts, but did not prevent same-block data loss, particularly when users edited offline and reconnected later.

## Approach / What changed

The system uses an RGA-based CRDT with stable text-item IDs, Lamport-clock ordering, tombstones for deletions, and grouped character runs for storage efficiency. Peritext-style operations represent rich-text annotations. Text slices and slice trees track text across blocks during concurrent splits, while text-instance mappings and compact L/R search labels help locate affected slices efficiently.

## Takeaways

- The CRDT represents inserted characters as nodes with stable IDs composed of a session ID and Lamport clock; concurrent inserts sharing an origin are ordered by logical timestamp, with session ID as a tie-breaker.
- Deleted text items remain as tombstones so in-flight or offline operations can still reference their IDs. Characters can be grouped into contiguous runs instead of assigning an ID to every character.
- Text slices move between blocks when a split occurs, allowing concurrent edits to follow their intended text. Search labels based on L/R split paths narrow block lookups, and their compact encoding improves storage efficiency fivefold.

## FAQ

### Why does the CRDT keep deleted text as tombstones?

Operations that are still in flight or were created offline may reference deleted character IDs. Keeping those items in the tree preserves the information needed to apply such operations.

### How are simultaneous rich-text formatting changes handled?

Peritext-based operations add or remove annotations over anchored text ranges. A text item can carry multiple annotation operations, allowing overlapping formatting such as bold and italics to coexist.

### How can an edit follow text after a concurrent block split?

Text slices identify portions of text and can move into a new block when a split occurs, while slice trees reconstruct each block’s content. Search labels record the L/R path created by splits, and prefix matching still finds a slice if it is split again concurrently.

**Tags:** [CRDT](https://yomu.fyi/topic/crdt), [Distributed Systems](https://yomu.fyi/topic/distributed-systems), [Offline Computing](https://yomu.fyi/topic/offline)

- Source: [Notion](https://www.notion.com/en-gb/blog/how-notion-handles-concurrent-editing-with-crdts)
- Source URL: https://www.notion.com/en-gb/blog/how-notion-handles-concurrent-editing-with-crdts
- Ingested by Yomu: 2026-09-18T18:00:13.838Z

[Read original post](https://www.notion.com/en-gb/blog/how-notion-handles-concurrent-editing-with-crdts)
