# Fix divergence bug when peer reconnects reusing a prior replica id · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/f9e0899e5820ee2c7d9e66dd7e929d4e7573e238)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: f9e0899e5820ee2c7d9e66dd7e929d4e7573e238

Requested commit: f9e0899e5820ee2c7d9e66dd7e929d4e7573e238

Commit: f9e0899e5820ee2c7d9e66dd7e929d4e7573e238

Tree: e57c85bea301b90b09bf7526bd4b5b75c5d8c8da

Author: Antonio Scandurra

Committer: Antonio Scandurra

## Message

```
Fix divergence bug when peer reconnects reusing a prior replica id

We forgot to observe the footprint of the reconnecting replica's prior
undos into the local clock. This could cause the replica to generate
edits with a version strictly smaller than what other peers may have
observed. As such, those peers would think they had already seen those
edits and skip them.

```

## Parents

- [af674e1c00c0ea88b8a9b7d4d9f9fd2a1d8c69ed](https://git.cafe/gitcafe/zed/commit/af674e1c00c0ea88b8a9b7d4d9f9fd2a1d8c69ed?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/f9e0899e5820ee2c7d9e66dd7e929d4e7573e238?format=markdown)
