Skip to main content
A LwwRegister (Last-Write-Wins Register) holds a single value. When two clients write concurrently, the write with the higher HLC (Hybrid Logical Clock) timestamp wins. Ties are broken by client ID.

Usage without schema

Usage with schema

API

Conflict resolution

Conflicts are resolved by HLC timestamp (wall clock + logical counter). The write with the highest timestamp wins. If timestamps are equal, the write from the highest client_id wins. This is deterministic and consistent across all replicas.