Skip to content

load_schema race #333

@askalt

Description

@askalt

These lines result in the exception, trying to connect to the instance that actively applies DDL due to the race between object creation:

self.schema.fetch_space_all()
self.schema.fetch_index_all()

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]])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions