Skip to content

Commit

Permalink
Don't fetch schema in inner pool.connect calls
Browse files Browse the repository at this point in the history
  • Loading branch information
yngvar-antonsson committed Jan 15, 2025
1 parent 829ddcf commit a17c0df
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Changed

- Update ``membership`` dependency to `2.4.6 <https://github.com/tarantool/membership/releases/tag/2.4.6>`_.

- Cartridge doesn't fetch schema in inner ``pool.connect`` calls.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Added
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion cartridge/lua-api/boxinfo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ local function get_info(uri)
return ret
end

local conn, err = pool.connect(uri, {wait_connected = false})
local conn, err = pool.connect(uri, {wait_connected = false, fetch_schema = false})
if not conn then
return nil, err
end
Expand Down
4 changes: 2 additions & 2 deletions cartridge/lua-api/compression.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ local function get_cluster_compression_info()
if role == 'vshard-storage' then
local master = rpl.master

local conn, err = pool.connect(master.uri, {wait_connected = true})
local conn, err = pool.connect(master.uri, {wait_connected = true, fetch_schema = false})
if not conn or err ~= nil then
if err ~= nil then
log.error(err)
Expand All @@ -49,7 +49,7 @@ local function get_cluster_compression_info()
)

if storage_compression_info == nil or err ~= nil then
if err ~=nil then
if err ~= nil then
log.error(err)
end
table.insert(compression_info, {
Expand Down
2 changes: 1 addition & 1 deletion cartridge/lua-api/proxy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ local function call(function_name, ...)
checks('string')

local destination = get_destination()
local conn = pool.connect(destination, {wait_connected = false})
local conn = pool.connect(destination, {wait_connected = false, fetch_schema = false})

-- Both get_topology and edit_topology API return recursive lua
-- tables which can't be passed over netbox as is. So we transfer
Expand Down
2 changes: 1 addition & 1 deletion cartridge/lua-api/stat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ local function get_stat(uri)
}
end

local conn, err = pool.connect(uri, {wait_connected = false})
local conn, err = pool.connect(uri, {wait_connected = false, fetch_schema = false})
if not conn then
return nil, err
end
Expand Down
2 changes: 1 addition & 1 deletion cartridge/roles/vshard-router.lua
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ local function bootstrap_group(group_name, vsgroup)
for _, replicaset in pairs(info.replicasets or {}) do
local uri = replicaset.master.uri
local ready = errors.netbox_eval(
pool.connect(uri, {wait_connected = false}),
pool.connect(uri, {wait_connected = false, fetch_schema = false}),
'return box.space._bucket ~= nil',
{}, {timeout = 1}
)
Expand Down
2 changes: 1 addition & 1 deletion cartridge/vshard-utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ local function validate_group_upgrade(group_name, topology_new, topology_old)
local master_uri = servers_old[master_uuid].uri

local buckets_count, _ = errors.netbox_call(
pool.connect(master_uri, {wait_connected = false}),
pool.connect(master_uri, {wait_connected = false, fetch_schema = false}),
'vshard.storage.buckets_count', nil, {timeout = 1}
)

Expand Down

0 comments on commit a17c0df

Please sign in to comment.