Skip to content

Commit

Permalink
TOOLS-2669 TOOLS-2683 TOOLS-2705 TOOLS-2706 7.0 config/stats changes (#…
Browse files Browse the repository at this point in the history
…218)

* feat: TOOLS-2669 TOOLS-2683 7.0 changes
Including changes to `show stop-writes` and `summary` as well as bug fixes to both.

* feat: TOOLS-2669 handle new set level data_used_bytes metric

* fix: TOOLS-2705 fix `info set` `Usage%` calculation

* feat: TOOLS-2706 add `Records Quota` to `info set` cmd
  • Loading branch information
Jesse S authored Oct 19, 2023
1 parent b9e687e commit 2130398
Show file tree
Hide file tree
Showing 10 changed files with 3,008 additions and 1,261 deletions.
2 changes: 2 additions & 0 deletions lib/collectinfo_analyzer/info_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,15 @@ def _do_default(self, line):
@CommandHelp("Displays usage information for each namespace")
def do_usage(self, line):
ns_stats = self.stat_getter.get_namespace()
service_stats = self.stat_getter.get_service()

for timestamp in sorted(ns_stats.keys()):
if not ns_stats[timestamp]:
continue

self.view.info_namespace_usage(
ns_stats[timestamp],
service_stats[timestamp],
self.log_handler.get_cinfo_log_at(timestamp=timestamp),
timestamp=timestamp,
**self.mods,
Expand Down
142 changes: 103 additions & 39 deletions lib/health/query.py

Large diffs are not rendered by default.

154 changes: 108 additions & 46 deletions lib/health/query/health.hql

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions lib/live_cluster/info_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ class InfoNamespaceController(LiveClusterCommandController):
def __init__(self, get_futures=False):
self.modifiers = set(["with"])
self.get_futures = get_futures
self.stats_getter = GetStatisticsController(self.cluster)

@CommandHelp(
"Displays usage and objects information for each namespace",
Expand All @@ -259,9 +260,16 @@ async def _do_default(self, line):
modifiers=(with_modifier_help,),
)
async def do_usage(self, line):
stats = await self.cluster.info_all_namespace_statistics(nodes=self.nodes)
service_stats, ns_stats = await asyncio.gather(
self.stats_getter.get_service(nodes=self.nodes),
self.stats_getter.get_namespace(nodes=self.nodes),
) # Includes stats and configs
return util.callable(
self.view.info_namespace_usage, stats, self.cluster, **self.mods
self.view.info_namespace_usage,
ns_stats,
service_stats,
self.cluster,
**self.mods,
)

@CommandHelp(
Expand Down
1 change: 0 additions & 1 deletion lib/live_cluster/show_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,6 @@ def __init__(self):
)
async def _do_default(self, line):
return await asyncio.gather(
self.do_bins(line[:]),
self.do_sets(line[:]),
self.do_service(line[:]),
self.do_namespace(line[:]),
Expand Down
Loading

0 comments on commit 2130398

Please sign in to comment.