From 94c7489c1ca41a5ce49affc52eccee7ab0539087 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 10 Oct 2025 13:36:28 +0900 Subject: [PATCH] Add some logging when `FindWithRefresh` triggers a slow realm refresh --- osu.Game/Beatmaps/BeatmapManager.cs | 1 + osu.Game/Database/RealmExtensions.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs index a3e7c1365e..b828d88591 100644 --- a/osu.Game/Beatmaps/BeatmapManager.cs +++ b/osu.Game/Beatmaps/BeatmapManager.cs @@ -284,6 +284,7 @@ namespace osu.Game.Beatmaps /// /// Returns a list of all usable s. + /// IMPORTANT: This should not be used outside of tests. Consider using instead. /// /// A list of available . public List GetAllUsableBeatmapSets() diff --git a/osu.Game/Database/RealmExtensions.cs b/osu.Game/Database/RealmExtensions.cs index c84e1e35b8..1bb6b0aba4 100644 --- a/osu.Game/Database/RealmExtensions.cs +++ b/osu.Game/Database/RealmExtensions.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using System; +using osu.Framework.Logging; using Realms; namespace osu.Game.Database @@ -29,6 +30,7 @@ namespace osu.Game.Database // It may be that we access this from the update thread before a refresh has taken place. // To ensure that behaviour matches what we'd expect (the object generally *should be* available), force // a refresh to bring in any off-thread changes immediately. + Logger.Log($"{nameof(FindWithRefresh)} triggered a realm refresh because it couldn't find the requested guid {id}"); realm.Refresh(); found = realm.Find(id); }