module

LavinMQ::Clustering::Replicator

Instance methods

all_followers
Source
append(path : String, pos : Int, length : Int)
Source
append_bytes(path : String, bytes : Bytes, offset : Int64)
Source
append_value(path : String, value : UInt32 | Int32, offset : Int64)

offset is the absolute byte position the value/bytes are written at on the leader; used to skip appends a just-joined follower already received via full_sync (see Server#append). Distinct names avoid colliding with the positional append(path, pos, length) overload.

Source
clear
Source
close
Source
delete_dir(path : String)
Source
delete_file(path : String)
Source
flush_isr
Source
followers
Source
isr_dirty?

ISR bookkeeping for the publish-confirm path: a confirm may only be sent against an ISR that is committed to the coordinator (see Persister#wait_for_followers).

Source
listen(server : TCPServer)
Source
password
Source
register_file(path : String)
Source
register_file(file : File)
Source
register_file(mfile : MFile)
Source
replace_file(path : String)
Source
replace_file(mfile : MFile)
Source
request_fsync(paths : Enumerable(String)) : Nil

Ask every in-sync follower to fsync these (absolute) paths, or to sync its whole data dir, before acking past what has been replicated so far. Callers then wait_for_followers.

Source
request_syncfs
Source
syncing_followers
Source
wait_for_followers

Block until every in-sync follower has acked everything replicated so far, then commit any pending ISR change. Called after a durable operation has been dispatched and locally fsynced, before it is acknowledged to a client (publish confirms via the Persister, definition changes via the DefinitionsStore).

Source