tarantool-python
tarantool-python copied to clipboard
`load_schema` race
These lines result in an index exception, trying to connect to the instance that actively applies DDL due to the race with the tarantool object creation:
https://github.com/tarantool/tarantool-python/blob/28310fc4e927c77d3be75e98360bf3b09f72482a/tarantool/connection.py#L1409-L1410
As these two fetches are non-transactional, the second one can return an index for space that is not fetched at the first fetch, resulting in:
Traceback (most recent call last):
File "/python/lib/python3.11/site-packages/tarantool/connection.py", line 1097, in connect
self.load_schema()
File "/python/lib/python3.11/site-packages/tarantool/connection.py", line 1316, in load_schema
self.schema.fetch_index_all()
File "/python/lib/python3.11/site-packages/tarantool/schema.py", line 377, in fetch_index_all
SchemaIndex(row, self.schema[row[0]])