From 6efb4817e1d56e52740d48765699398c7ef27a1b Mon Sep 17 00:00:00 2001 From: Denis Ignatenko Date: Fri, 31 May 2019 19:46:32 +0300 Subject: [PATCH] Set auth request schema to zero in req header --- tarantool/request.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tarantool/request.py b/tarantool/request.py index 85749cec..ace4e5b2 100644 --- a/tarantool/request.py +++ b/tarantool/request.py @@ -134,6 +134,16 @@ def sha1(values): request_body = msgpack.dumps({IPROTO_USER_NAME: user, IPROTO_TUPLE: ("chap-sha1", scramble)}) self._body = request_body + + def header(self, length): + self._sync = self.conn.generate_sync() + # Set IPROTO_SCHEMA_ID: 0 to avoid SchemaReloadException + # It is ok to use 0 in auth every time + header = msgpack.dumps({IPROTO_CODE: self.request_type, + IPROTO_SYNC: self._sync, + IPROTO_SCHEMA_ID: 0}) + + return msgpack.dumps(length + len(header)) + header class RequestReplace(Request):