Closed funny-falcon closed 7 years ago
You can try to call function 'take' + 'release' after. If it exists, then everything'll be ok.
Without ability to call create_tube
create_tube
isn't something that should be called from outside of Tarantool. It's "administration request" and, so, you should use eval
command to call it.
If it related to something, that you're doing here, then I can tell you, that you're doing "overkill" version of connector for queue. You won't be able to completely rid of Lua language, so it's better to abandon Queue DDL from driver.
I agree that creat_tube should not be called from client side but from configuration script or console.
Still check for existence is useful task, and take+release is a certainly wrong way to do it.
There should be queue.exist(tube_name)
which returns tube configuration if exists (so client may check type of queue), and return null if tube doesn't exist.
I don't like to call
eval
from client cause it needs to 'execute universe' privilege. But now there is no way neither check tube for existence nor create tube without usingeval
query.create_tube
fails cause it returns table that could not be serialized to msgpack and sent to response. Without ability to callcreate_tube
single way to check tube existence iseval('return queue.tube.myqueu ~= nil')
.Please add ability to check tube existence without eval. And/or ability to create tube using iproto connector.