Skip to content
Snippets Groups Projects
Verified Commit c133bd68 authored by Denis Smirnov's avatar Denis Smirnov
Browse files

fix: tarantool yields on load metadata while holding mut reference

Previously for every query we hold a mutable reference on an engine
and tried to load a cluster metadata if the cache was empty. The
problem was that tarantool yields on a first query uploading the
cache to a new one, that also tries to get a mutable reference to
the engine.
The main problem was that we should never hold a mutable reference
to an object with a Lua code, that can be yielded by tarantool
(such behavior is opaque to the Rust compiler). To deal with it we
shrink a metadata upload to a list of separate methods. For the
ones that can yield we always hold an immutable reference. Those
methods that need a mutable reference to the engine never yield.
parent aa07546f
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