From c35d9c1b85dc317057d47d9d2353006a8f592dbe Mon Sep 17 00:00:00 2001 From: erikjohnston Date: Tue, 11 Apr 2023 14:10:27 +0000 Subject: deploy: c1b7da69ccd217145892157777b367924fa0028d --- latest/tcp_replication.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'latest/tcp_replication.html') diff --git a/latest/tcp_replication.html b/latest/tcp_replication.html index 04c1c1b02f..1b427ca48d 100644 --- a/latest/tcp_replication.html +++ b/latest/tcp_replication.html @@ -168,7 +168,7 @@ position of all streams. The server then periodically sends RDATA c which have the format RDATA <stream_name> <instance_name> <token> <row>, where the format of <row> is defined by the individual streams. The <instance_name> is the name of the Synapse process that generated the data -(usually "master").

+(usually "master"). We expect an RDATA for every row in the DB.

Error reporting happens by either the client or server sending an ERROR command, and usually the connection will be closed.

Since the protocol is a simple line based, its possible to manually @@ -235,7 +235,7 @@ reconnect, following the steps above.

If the server sends messages faster than the client can consume them the server will first buffer a (fairly large) number of commands and then disconnect the client. This ensures that we don't queue up an unbounded -number of commands in memory and gives us a potential oppurtunity to +number of commands in memory and gives us a potential opportunity to squawk loudly. When/if the client recovers it can reconnect to the server and ask for missed messages.

Reliability

@@ -246,7 +246,7 @@ disappears.

since these include tokens which can be used to restart the stream on connection errors.

The client should keep track of the token in the last RDATA command -received for each stream so that on reconneciton it can start streaming +received for each stream so that on reconnection it can start streaming from the correct place. Note: not all RDATA have valid tokens due to batching. See RdataCommand for more details.

Example

@@ -297,7 +297,8 @@ request to the appropriate process.

Two positions are included, the "new" position and the last position sent respectively. This allows servers to tell instances that the positions have advanced but no data has been written, without clients needlessly checking to see if they -have missed any updates.

+have missed any updates. Instances will only fetch stuff if there is a gap between +their current position and the given last position.

ERROR (S, C)

There was an error

PING (S, C)

-- cgit 1.4.1