Skip to content

Commit 6da53d0

Browse files
committed
disable schema fetch for cartridge.pool connections
Cartridge uses only netbox.call and eval. So seems we could safety disable schema fetching for netbox. New Tarantool versions allows to disable schema fetching to avoid additional pressure that schema fetching creates. See also tarantool/doc#2680
1 parent 8895872 commit 6da53d0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

cartridge/pool.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ local function connect(uri, opts)
9898
end
9999

100100
conn, err = NetboxConnectError:pcall(netbox.connect,
101-
_uri, {wait_connected = false}
101+
_uri, {wait_connected = false, fetch_schema = false}
102102
)
103103
if err ~= nil then
104104
return nil, err

test/integration/pool_connect_test.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ function g.test_identity()
5454
opts = {
5555
user = 'admin',
5656
wait_connected = false,
57+
fetch_schema = false,
5758
},
5859
})
5960

@@ -135,3 +136,9 @@ function g.test_async_call_remote()
135136
local future = conn:call('pcall', {'smth'}, {is_async = true})
136137
t.assert_equals({future:wait_result()}, {{false, 'attempt to call a string value'}})
137138
end
139+
140+
function g.test_schema_fetch()
141+
t.skip_if(not helpers.tarantool_version_ge('2.10.0'))
142+
local conn = pool.connect('localhost:13301')
143+
t.assert_equals(conn.space, nil)
144+
end

0 commit comments

Comments
 (0)