Dean Herbert
8f1dfa33a2
Merge branch 'master' into realm-context-use-update-when-feasible
2022-01-21 18:03:09 +09:00
Dean Herbert
da0a803e6c
Add RealmContextFactory.Write
helper method
2022-01-21 17:08:05 +09:00
Dean Herbert
a59105635e
Make CreateContext
private
2022-01-21 16:40:20 +09:00
Dean Herbert
dde10d1ba2
Remove unused IRealmFactory
interface
2022-01-21 16:38:07 +09:00
Dean Herbert
0c9eb3ad61
Add realm factory helper methods to run work on the correct context
...
Avoids constructing a new `Realm` instance when called from the update
thread without worrying about disposal.
2022-01-21 01:33:47 +09:00
Dean Herbert
7aad2780b1
Add retry logic for realm backup creation
2022-01-21 00:46:53 +09:00
Dean Herbert
5df46d0a54
Remove all calls to Realm.Refresh
to fix blocking overhead from subscriptions
...
Turns out this is not required if realm is aware of a
`SynchronizationContext`. See
https://github.com/realm/realm-dotnet/discussions/2775#discussioncomment-2005412
for further reading.
2022-01-20 20:23:18 +09:00
Dean Herbert
fb558a3189
Merge branch 'master' into realm-integration/reinit-on-corrupt
2022-01-19 12:26:24 +09:00
Dan Balasescu
c52899b1fb
Rename property
2022-01-19 11:56:44 +09:00
Dean Herbert
261b4988f9
Only catch RealmExceptions
to avoid blocking the nested TimeoutException
2022-01-19 10:58:59 +09:00
Dean Herbert
49fcff190a
Merge branch 'master' into realm-integration/reinit-on-corrupt
2022-01-18 18:02:23 +09:00
Dean Herbert
7baada2fa6
Merge branch 'master' into realm-integration/safer-migration
2022-01-18 18:01:46 +09:00
Dean Herbert
246a4a4bfe
Add support for starting with a fresh realm database if the existing one is not usable
...
The most common scenario is switching between schema versions when
testing. This should alleviate the manual overhead of that for the
majority of cases.
For users, this will show a notification on startup if their database
was purged, similar to what we had with EF.
2022-01-18 16:05:13 +09:00
Dean Herbert
1b62a685f3
Merge branch 'master' into realm-integration/score-and-beatmaps
2022-01-18 15:07:59 +09:00
Dean Herbert
3429fd8768
Fix transaction scope and add even more logging
2022-01-18 14:47:00 +09:00
Dean Herbert
bf50a9b8f8
Also backup the realm database before migration
2022-01-18 14:30:41 +09:00
Dean Herbert
2b1c15b6cc
Allow BlockAllOperations
to be called from a non-update thread if update has never run
2022-01-18 14:30:32 +09:00
Dean Herbert
a7db793d8c
Specify realm pipe path location
...
I can't confirm this works yet, since I'm not sure what the
preconditions are for the `.note` file to be created. What I can confirm
is that a `.note` file hasn't appeared in my game data directory yet.
2022-01-18 11:43:23 +09:00
Dean Herbert
dcc354aa7c
Fix deleted scores not being cleaned up on next startup
2022-01-13 13:40:09 +09:00
Dean Herbert
7a81fe19f6
Bump realm schema version to allow upgrades
2022-01-13 13:28:46 +09:00
Dean Herbert
e12025dd48
Cascade delete metadata when beatmaps are deleted
2022-01-12 17:49:11 +09:00
Dean Herbert
5f7365e8f3
Ensure scores are cleaned up alongside beatmap so they don't have a null reference
2022-01-12 17:49:11 +09:00
Dean Herbert
3ecd889fef
Replace EF RulesetStore
with realm version
...
Pass full EF context factory to `RealmContextFactory` for migration purposes
2022-01-12 16:39:36 +09:00
Dean Herbert
618903c217
Rename realm to become imposter classes
2022-01-12 16:39:36 +09:00
Dean Herbert
e83ada40f9
Merge branch 'realm-nested-context-creation-deadlock-fix' into realm-integration/skins-rebase
2021-11-30 15:56:34 +09:00
Dean Herbert
6f66ecd77b
Move migrations to own file and add user skin choice config migration
2021-11-30 15:41:18 +09:00
Dean Herbert
a943089be2
Add support for migration of skins from EF to Realm
2021-11-30 15:17:26 +09:00
Dean Herbert
0bcfb8e199
Fix regression in implementation of fix
2021-11-29 18:52:29 +09:00
Dean Herbert
5db7cf23d3
Add pending deletion skin cleanup
2021-11-29 18:28:25 +09:00
Dean Herbert
23fded4a3a
Fix potential oversight in semaphore release logic
2021-11-29 18:26:37 +09:00
Dean Herbert
f19cfcc82e
Make readonly
2021-11-29 17:38:54 +09:00
Dean Herbert
673481ebc5
Use ThreadLocal
to avoid potential threading issues
2021-11-29 17:38:42 +09:00
Dean Herbert
c98451a7bf
Fix potential deadlock on nested context creation requests
2021-11-29 16:29:53 +09:00
Bartłomiej Dach
93b5aec23e
Fix realm migration failures when upgrading from old versions
...
* `RealmRulesetSetting` was added in 2021.916.0.
* `RealmKeyBinding` was added in 2021.703.0.
Attempting to upgrade from older releases than the above would cause
migrations up to schema versions 10 and 11 to fail.
2021-11-28 15:00:40 +01:00
Dean Herbert
bcdb73e1e8
Clean up files last
2021-11-25 14:28:27 +09:00
Dean Herbert
315e126497
Add automatic clean-up call for RealmFileStore
2021-11-25 14:17:44 +09:00
Dean Herbert
052ed8f930
Add online status to RealmBeatmapSet
2021-11-24 18:48:02 +09:00
Dan Balasescu
c4b5a07f4b
Merge branch 'master' into realm-move-data-migration-to-context-factory
2021-11-24 14:40:26 +09:00
Dan Balasescu
5a0a95f9d4
Trim whitespace
2021-11-24 13:48:59 +09:00
Dean Herbert
6aed41eacc
Merge branch 'master' into realm-move-data-migration-to-context-factory
2021-11-24 12:38:44 +09:00
Dean Herbert
63b09b356f
Rewrite commments to read better
2021-11-24 12:37:09 +09:00
Dean Herbert
6cd1bfd94f
Remove outdated comment
2021-11-24 12:35:05 +09:00
Bartłomiej Dach
0d409fa33e
Merge branch 'master' into realm-ruleset-keybinding-short-name
2021-11-23 20:18:58 +01:00
Dean Herbert
6b134359c9
Handle the case where the ruleset isn't found in the EF database any more
2021-11-23 19:15:52 +09:00
Dean Herbert
4149d458f0
Move realm data migrations inside the RealmContextFactory
2021-11-23 18:14:15 +09:00
Dean Herbert
d9917ee6c7
Merge branch 'realm-ruleset-setting-short-name' into realm-ruleset-keybinding-short-name
2021-11-23 18:13:26 +09:00
Dean Herbert
40cd998f99
Fix incorrect disposal
2021-11-23 18:13:05 +09:00
Dean Herbert
782191c410
Merge branch 'realm-ruleset-setting-short-name' into realm-ruleset-keybinding-short-name
2021-11-23 17:48:48 +09:00
Dean Herbert
b1b6723826
Add xmldoc and verbatim string markers
2021-11-23 17:47:43 +09:00
Dean Herbert
505fede44d
Pass the full EF context rather than a legacy RulesetStore
2021-11-23 17:40:20 +09:00