Commit a5b42720 authored by Vladislav Grubov's avatar Vladislav Grubov 📈
Browse files

switchover top: support spaces stats (interactive)

parent bf88185c
Loading
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -291,9 +291,6 @@ do
		:default(1)
		:convert(tonumber)

	top:flag "--show-spaces"
		:target "show_spaces"
		:description "Fetches spaces info and shows it in top"

	top:argument "cluster_name|shard_name"
		:target "cluster_or_shard"
+6 −0
Original line number Diff line number Diff line
@@ -332,6 +332,12 @@ function Cluster:instance_by_uuid(instance_uuid)
	end
end

---@param instance_name string
---@return boolean
function Cluster:has_instance(instance_name)
	return self.tree.instances[instance_name] ~= nil
end

---Returns verbose instance info by name
---@param instance_name string name of the instance
---@return ExtendedInstanceInfo
+6 −0
Original line number Diff line number Diff line
@@ -128,6 +128,12 @@ function Proxy:instance_by_uuid(instance_uuid)
	end
end

---@param instance_name string
---@return boolean
function Proxy:has_instance(instance_name)
	return self.tree.instances[instance_name] ~= nil
end

---@return ExtendedInstanceInfo
function Proxy:instance(instance_name)
	if self.tree.instances[instance_name] == nil then
+1 −0
Original line number Diff line number Diff line
@@ -595,6 +595,7 @@ function Tarantool:_get(opts)
							:map(function(_, s)
								return {
									name=s.name,
									id=s.id,
									len=s:len(),
									bsize=s:bsize(),
									isize=require'fun'.range(0, #s.index)
+1 −1
Original line number Diff line number Diff line
@@ -545,7 +545,7 @@ function M.cluster(args)
		need_discovery = args.need_discovery,
	}

	return M.refresh({ shards = shards, cluster = cluster })
	return M.refresh({ shards = shards, cluster = cluster, fetch = args.fetch })
end

---@class SwitchoverResolveAndDiscoveryInfo
Loading