1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:20:04 +08:00
osu-lazer/osu.Game/Database
Dean Herbert 8e80e2fa32 Fix incorrect realm copy logic when a beatmap becomes detached from its set
The code here was assuming that if the beatmap which is having changes
copied across does not exist within the `BeatmapSet.Beatmaps` list, it
was not yet persisted to realm.

In some edge case, it can happen that the beatmap *is* persisted to
realm but not correctly attached to the beatmap set. I don't yet know
how this occurs, but it has caused loss of data for at least two users.

The fix here is to check realm-wide for the beatmap (using its primary
key) rather than only in the list. We then handle the scenario where the
beatmap needs to be reattached to the set as a seprate step.

---

This does raise others questions like "are we even structuring this
correctly? couldn't a single beatmap exist in two different sets?"

Maybe, but let's deal with that if/when it comes up.
2023-06-27 18:20:01 +09:00
..
BeatmapLookupCache.cs Apply NRT in MemoryCachingComponent subclasses too 2023-06-09 13:47:35 +02:00
EmptyRealmSet.cs Automated #nullable processing 2022-06-17 16:37:17 +09:00
ICanAcceptFiles.cs Automated pass 2023-06-24 01:00:03 +09:00
IHasFiles.cs Manual fixes to reduce warnings to zero 2023-06-24 01:52:53 +09:00
IHasGuidPrimaryKey.cs Automated pass 2023-06-24 01:00:03 +09:00
IHasNamedFiles.cs Automated pass 2023-06-24 01:00:03 +09:00
IHasOnlineID.cs Automated #nullable processing 2022-06-17 16:37:17 +09:00
IHasPrimaryKey.cs Automated pass 2023-06-24 01:00:03 +09:00
IHasRealmFiles.cs Match class name to file 2022-08-10 19:53:40 +09:00
IModelDownloader.cs Automated #nullable processing 2022-06-17 16:37:17 +09:00
IModelFileManager.cs Automated pass 2023-06-24 01:00:03 +09:00
IModelImporter.cs Move ImportParameters to better home 2022-12-13 21:41:26 +09:00
IModelManager.cs Automated pass 2023-06-24 01:00:03 +09:00
ImportParameters.cs Move ImportParameters to better home 2022-12-13 21:41:26 +09:00
ImportProgressNotification.cs Partial everything 2022-11-27 00:00:27 +09:00
ImportTask.cs Delegate file deletion to ImportTask to allow overriding it 2023-01-22 22:19:04 +01:00
INamedFile.cs Automated #nullable processing 2022-06-17 16:37:17 +09:00
INamedFileInfo.cs Automated pass 2023-06-24 01:00:03 +09:00
INamedFileUsage.cs Automated #nullable processing 2022-06-17 16:37:17 +09:00
IPostNotifications.cs Automated pass 2023-06-24 01:00:03 +09:00
ISoftDelete.cs Remove redundant nullable suppression directives 2023-06-07 08:20:41 +03:00
LegacyArchiveExporter.cs Reorder increment to make progress update less weird 2023-05-06 19:39:52 +02:00
LegacyBeatmapExporter.cs Mark exporter extensions as untranslatable 2023-05-06 19:42:28 +02:00
LegacyBeatmapImporter.cs Remove unused using 2022-11-17 13:56:27 +09:00
LegacyCollectionImporter.cs Fix re-importing existing collections not correctly adding new items 2022-08-16 16:43:05 +09:00
LegacyExporter.cs Move lower and xmldoc GetFilename(TModel) 2023-05-06 19:29:08 +02:00
LegacyImportManager.cs Only show message about Songs folder 2023-01-09 11:47:13 +02:00
LegacyModelImporter.cs Move ImportParameters to better home 2022-12-13 21:41:26 +09:00
LegacyScoreExporter.cs Mark exporter extensions as untranslatable 2023-05-06 19:42:28 +02:00
LegacyScoreImporter.cs Path.GetExtension() will not get null 2023-02-19 02:56:53 +09:00
LegacySkinExporter.cs Mark exporter extensions as untranslatable 2023-05-06 19:42:28 +02:00
LegacySkinImporter.cs create a task to export to avoid block main thread 2022-11-17 01:08:06 +09:00
Live.cs Fix the MOTHERLOAD of undetected issues that are now visible thanks to net6.0 2022-12-16 18:16:26 +09:00
MemoryCachingComponent.cs Apply NRT to MemoryCachingComponent classes 2023-06-09 19:00:05 +09:00
ModelDownloader.cs Merge branch 'master' into guard-url-protocols 2022-12-16 18:23:16 +09:00
ModelManager.cs Don't use bindables to avoid potential cross-usage contamination 2023-01-10 01:10:20 +09:00
OnlineLookupCache.cs Apply NRT to MemoryCachingComponent classes 2023-06-09 19:00:05 +09:00
RealmAccess.cs Force migration of old-new standardised scores to run once more 2023-06-16 14:04:18 +09:00
RealmArchiveModelImporter.cs Delegate file deletion to ImportTask to allow overriding it 2023-01-22 22:19:04 +01:00
RealmExtensions.cs Fix transaction not being disposed 2022-07-07 18:15:38 +09:00
RealmFileStore.cs Remove usages of [ExcludeFromDynamicCompile] 2023-05-08 18:12:56 +09:00
RealmLive.cs Fix PerformWrite not rolling back transaction on exception 2022-06-30 15:15:09 +09:00
RealmLiveUnmanaged.cs Automated #nullable processing 2022-06-17 16:37:17 +09:00
RealmObjectExtensions.cs Fix incorrect realm copy logic when a beatmap becomes detached from its set 2023-06-27 18:20:01 +09:00
StandardisedScoreMigrationTools.cs Fix old-new standardised score conversion missing some scores due to not rounding correctly 2023-06-16 14:01:56 +09:00
TooManyDownloadsNotification.cs Partial everything 2022-11-27 00:00:27 +09:00
UserLookupCache.cs Apply NRT to MemoryCachingComponent classes 2023-06-09 19:00:05 +09:00