From 8110fddfe5b404e0bb58ddc4738056243d09f085 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 14 Feb 2025 18:09:34 +0000 Subject: [PATCH 1/2] Document the sql_live performance limitations. --- data/example.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/example.conf b/data/example.conf index 56e7e4466..7464244fd 100644 --- a/data/example.conf +++ b/data/example.conf @@ -1162,7 +1162,8 @@ module * db_sql_live module allows saving and loading databases using one of the SQL engines. * This module reads and writes to SQL in real time. Changes to the SQL tables * will be immediately reflected into Anope. This module should not be loaded - * in conjunction with db_sql. + * in conjunction with db_sql. It should also not be used on large networks as it + * executes quite a lot of queries which can cause performance issues. * */ #module From fbb8442252020fb9bb0091f4893709e3f3d962d6 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 14 Feb 2025 18:11:34 +0000 Subject: [PATCH 2/2] Reset the stats properly. Closes #465. --- modules/commands/os_stats.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/commands/os_stats.cpp b/modules/commands/os_stats.cpp index a8fabc9da..9cbe57503 100644 --- a/modules/commands/os_stats.cpp +++ b/modules/commands/os_stats.cpp @@ -128,6 +128,8 @@ class CommandOSStats : public Command void DoStatsReset(CommandSource &source) { MaxUserCount = UserListByNick.size(); + MaxUserTime = Anope::CurTime; + Stats::me->QueueUpdate(); source.Reply(_("Statistics reset.")); return; }