Zettelkasten

replication handle write conflicts

·수정 2026.04.23·수정 3

distributed counter

version 1

a: count(3) b: count(5)

correct answer: 8 concurrent writes:

version vector: 노드별로 데이터를 얼마나 변경했는지 기록한 목록

  • disregard

when are writes concurrent?

Pasted image 20241127093628.png

  • 맨위에서부터 시계방향으로 1,2,3 노드라고 하면
  • 1 <- 2로 [1,1,1]를 보내면 disregard 함 왜냐하면 이미 1번은 2번보다 큰 값을 갖기 때문임

option 1: store siblings have

  • [1,0]. [0,1] => write conflicts
  • storing the both writes

option 2: The database automatically merges them for use

이 문서를 참조하는 노트 (1)