Commit Graph

89 Commits

Author SHA1 Message Date
c50ea89bc9 Simplify migration to not rely on old/dynamic schema 2023-02-08 14:24:06 +09:00
4ba915268c Change a comment into RealmAccess 2023-02-08 05:46:47 +03:00
PC
7e127dafe2 Update reference 2023-02-07 11:52:47 +03:00
a1ee3df453 Improve local variable naming 2023-02-07 03:16:25 +03:00
d23e787bc1 Update schema_version 2023-02-05 21:55:50 +03:00
4598112586 Add OriginalBeatmapHash to ScoreInfo. Update db schema_version, migration 2023-02-05 21:46:38 +03:00
27c497145f Fix the MOTHERLOAD of undetected issues that are now visible thanks to net6.0 2022-12-16 18:16:26 +09:00
42eafe318c Remove various simple obsoletions 2022-10-28 13:20:58 +09:00
64ee210825 Add realm migration to update skin names 2022-09-18 00:12:43 +09:00
581a4d2d6d Use APIBeatmap for realm migration requiring ShortName mapping 2022-09-15 16:58:58 +09:00
d947a6cb59 Add Realm migration 2022-08-24 17:28:41 +09:00
e1e6be039a Don't create destination stream if backup source doesn't exist 2022-08-17 18:20:47 +09:00
fca076b988 Fix edge case of realm backup cascading failure 2022-08-17 17:17:22 +09:00
11f38e539f Rename property to LastLocalUpdate 2022-08-16 16:01:19 +09:00
c7db4a532c Merge branch 'master' into store-modified-time 2022-08-16 15:53:51 +09:00
98c7138803 Merge pull request #19586 from peppy/realm-versioning-for-debug
Version realm files for debug executions
2022-08-10 21:17:51 +09:00
c31e257a1f Clean up pending deletion presets on startup 2022-08-07 15:16:33 +09:00
4544df5978 Leave client.realm around to handle pull requests without this change merged 2022-08-05 18:27:29 +09:00
ad3d00b1dc Don't add version suffixes when running unit tests 2022-08-05 18:23:41 +09:00
3c84b1a389 Change order of application to use original client.realm last 2022-08-05 17:48:51 +09:00
84a3fbd25c Version realm files for debug executions
To make it easier for developers to test out pull requests which bump
the realm schema version, realm files are now stored with the schema
version in the filename.

Note that this means any changes made to a newer version will not be
applied to previous ones.
2022-08-05 17:36:49 +09:00
d7a06abcab Add BeatmapInfo.LastUpdate to track the time of local changes 2022-08-02 00:53:07 +09:00
345f103119 Migrate mod preset column to use realm 2022-07-31 23:53:45 +02:00
6ad86ce5b7 Run collection import process asynchronously
Actually required to avoid deadlocking..
2022-07-31 01:06:57 +09:00
80ffa2cf20 Move collection database rather than deleting post-migration for safety 2022-07-31 00:54:00 +09:00
8e06d55960 Fix collection migration incorrectly running asynchronously 2022-07-31 00:53:39 +09:00
1669208a54 Add migration of existing collections database 2022-07-28 13:57:21 +09:00
8a0c8f5fd8 Fix some realm pieces not being cleaned up 2022-07-25 19:51:19 +09:00
94cd641fb4 Change migration to trigger reprocessing on every local beatmap
Was originally relying on the fact that this would be triggered due to a
null `LastOnlineUpdate`, but wouldn't cover the case of beatmaps with no
`OnlineID`.
2022-07-21 18:31:12 +09:00
d5e0dba9da Change default value of StarRating to -1 2022-07-21 18:20:46 +09:00
68f28ff660 Add last applied version to RulesetInfo 2022-07-21 18:15:25 +09:00
30daa0fd44 Add ranked and submitted date storage and filtering 2022-07-19 19:55:56 +09:00
6ea380d649 Add new properties to BeatmapInfo to track online hash and updates 2022-07-19 17:57:01 +09:00
51f91fe62e Update naming 2022-07-18 16:17:20 +09:00
4e7156cee8 Store user country on databased scores 2022-07-16 06:39:05 +03:00
c8c79d2185 Standardise HasReplay implementation (and remove from persisting to realm) 2022-07-15 16:14:21 +09:00
8820ea4006 Add last played date to BeatmapInfo 2022-07-13 16:36:43 +09:00
33db508301 Add note regarding why the realmRetrievalLock return is done on the async thread 2022-07-05 16:23:10 +09:00
5adec2c738 Ensure blocking restoration only completes after update callback work is completed 2022-07-05 14:39:14 +09:00
1b98936328 Rename realm ThreadLocal to better convey what it's doing
Every time I looked at this code I have to re-learn what it's doing.
Changing these variable names should help quite a bit.
2022-07-05 13:38:25 +09:00
506409a9c4 Fix realm backup creation failing when run from RealmAccess constructor
At the point of construction, we are not on the update thread, but it
doesn't really matter at this point because there's no other usages.
2022-07-04 16:45:23 +09:00
e28ee8bc7a Count time spent upwards to display attempts correctly 2022-07-02 10:46:52 +03:00
93809a92d4 Fix clashing error messaging during realm block operations 2022-07-02 16:30:04 +09:00
4fd47b5fa0 Add more verbose logging to realm blocking process 2022-07-02 12:36:56 +09:00
7cb4e32c17 Add one more lock to appease CI 2022-06-29 22:45:19 +09:00
a3b4a515fc Merge branch 'master' into realm-fix-async-write-after-disposal 2022-06-29 22:39:05 +09:00
32af4e41ea Add back thread safety and locking as required 2022-06-29 20:56:01 +09:00
ecdb30d215 Fix one more case of collection modification during enumeration
https://sentry.ppy.sh/share/issue/a61c27b2a63a4a6aa80e75873f9d87ca/
2022-06-29 02:28:23 +09:00
e10ac45fd7 Remove probably redundant realmLock
As far as I can tell all accesses are safe due to update thread
guarantees. The only weird one may be async writes during a
`BlockAllOperations`, but the `Compact` loop should handle this quite
amicably.
2022-06-28 16:55:54 +09:00
83982d258d Throw immediately if attempting to WriteAsync after disposed 2022-06-27 19:34:28 +09:00