write data in the store • Read transactions are just atomic snapshots • Write transaction: ◦ Take a snapshot ◦ Make changes ◦ Replace tree root with modified tree’s root (atomic pointer swap) • Only one write transaction allowed at once • Commit of write transaction blocks until changes are committed to Raft 11
or deletion events on a Go channel • Selectors on particular fields in the objects • Currently an internal feature, will expose through API in the future 14
transaction, log every change as well as updating the radix tree • The transaction log is serialized and replicated through Raft • Since our internal types are protobuf types, serialization is very easy • Followers replay the log entries into radix tree 17
field • Version stores the Raft index when the object was last updated • Updates must provide a base Version; are rejected if it is out of date • Similar to CAS • Also exposed through API calls that change objects in the store 18
trip to get consensus • Costly to do many transactions, but want to limit the size of writes to Raft • Batch primitive lets the store automatically split a group of changes across multiple writes to Raft 25