Skip to content
Snippets Groups Projects
Commit 2c7e82c2 authored by Serge Petrenko's avatar Serge Petrenko Committed by Serge Petrenko
Browse files

replication: send anonymous replica version id

Starting with commit f1c2127d ("replication: add META stage to JOIN")
replication master appends a special section, called IPROTO_JOIN_META to
the initial snapshot sent to the replica. This section contains the
latest raft term and synchronous transaction queue owner and term.

The section is only sent to nodes, which have a non-zero version_id.
For some reason, version_id encoding for FETCH_SNAPSHOT (analog of JOIN
for anonymous replicas) wasn't added in that commit, so anonymous
replicas do not receive synchronous queue state.

This leads to them raising ER_SPLIT_BRAIN errors later after join, when
the first synchronous row arrives.

In order to fix this, start encoding version_id in FETCH_SNAPSHOT
requests.

Closes #9401

NO_DOC=cherry-pick

(cherry picked from commit 58c006c9)
parent 03f8270b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment