diff --git a/anon_slave_test.go b/anon_slave_test.go index 81dcb81..9ef3558 100644 --- a/anon_slave_test.go +++ b/anon_slave_test.go @@ -156,8 +156,8 @@ func TestAnonSlaveSubscribeExpectedReplicaSetUUIDFail(t *testing.T) { ver, err := tntBoxVersion(box) require.NoError(err) - if ver >= version2_8_0 && ver < version2_9_0 { - t.Skip("Tarantool 2.8 returns an empty replicaset UUID, skip check") + if ver >= version2_8_0 && ver < version2_9_0 || ver >= version2_11_0 { + t.Skip("Tarantool 2.8/2.11 returns an empty replicaset UUID, skip check") } s, _ := NewAnonSlave(box.Listen, Options{ diff --git a/const.go b/const.go index 4498c26..c72fd12 100644 --- a/const.go +++ b/const.go @@ -32,6 +32,7 @@ const ( KeyLSN = uint(0x03) KeyTimestamp = uint(0x04) KeySchemaID = uint(0x05) + KeyVersionID = uint(0x06) KeySpaceNo = uint(0x10) KeyIndexNo = uint(0x11) KeyLimit = uint(0x12) @@ -378,7 +379,8 @@ const ( // 2.3.1 is min version for anonymous replication version2_3_1 = uint32(131841) // VersionID(2, 3, 1) // Add box.info.replication_anon - version2_5_1 = uint32(132353) // VersionID(2, 5, 1) - version2_8_0 = uint32(133120) // VersionID(2, 8, 0) - version2_9_0 = uint32(133376) // VersionID(2, 9, 0) + version2_5_1 = uint32(132353) // VersionID(2, 5, 1) + version2_8_0 = uint32(133120) // VersionID(2, 8, 0) + version2_9_0 = uint32(133376) // VersionID(2, 9, 0) + version2_11_0 = uint32(133888) // VersionID(2, 11, 0) ) diff --git a/fetch_snapshot.go b/fetch_snapshot.go index 4ea5fff..d91c3bc 100644 --- a/fetch_snapshot.go +++ b/fetch_snapshot.go @@ -1,5 +1,7 @@ package tarantool +import "github.com/tinylib/msgp/msgp" + // FetchSnapshot is the FETCH_SNAPSHOT command type FetchSnapshot struct{} @@ -12,6 +14,9 @@ func (q *FetchSnapshot) GetCommandID() uint { // MarshalMsg implements msgp.Marshaler func (q *FetchSnapshot) MarshalMsg(b []byte) (o []byte, err error) { o = b + o = msgp.AppendMapHeader(o, 1) + o = msgp.AppendUint(o, KeyVersionID) + o = msgp.AppendUint(o, uint(version2_9_0)) return o, nil }