Skip to content

Instantly share code, notes, and snippets.

@ringerc
Created August 11, 2017 02:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ringerc/d4a8fe97f5fd332d8b883d596d61e257 to your computer and use it in GitHub Desktop.
Save ringerc/d4a8fe97f5fd332d8b883d596d61e257 to your computer and use it in GitHub Desktop.
Failover slots with streaming rep proto
Phys rep Phys rep
using phys using
slot "B" phys slot "C"
+-------+ +--------+ +-------+
T | A <^--------+ B <---------+ C |
I | | | | | |
M +-------+ +--------+ +-------+
E | | |
| | | |CREATEs
| | | |logical slot X
v | | |("owned")
| | |as temp slot
| +<-----------------+
| |Creates upmirror |
| |slot "X" linked |
| |to phys slot "C" |
| |marked temp |
| <----------------+ |
|Creates upmirror | | <--------------------------+ +-----------------+
|slot "X" linked | | Attempt to decode from "X" | |
|to phys slot "B" | | | CLIENT |
|marked permanent | | +-------------------------> | |
+----------------> | | ERROR: slot X still being +-----------------+
| |Sees upmirror | created on master, not ready
| |slot "X" in |
| |list from "A", |
| |marks it |
| |permanent and |
| |copies state |
| +----------------> |
| | |Sees upmirror slot
| | |"X" on "B" got marked
| | |permanent (because it
| | |appears in B's slot
| | |listings),
| | |marks permanent on C.
| | |Copies state.
| | |
| | |Slot "X" now persistent
| | |and (when decoding on standby
| | |supported) can be used for decoding
| | |on standby.
+ + +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment