Dean Herbert
d2062ff97f
Reformat realm migrations list for legibility
2021-11-22 18:47:18 +09:00
Dean Herbert
361cb78880
Fix realm applying migrations from one version too early
2021-11-22 18:46:46 +09:00
Dean Herbert
dfbc1f3394
Fix "conflicting" variable name
2021-11-09 17:42:03 +09:00
Dean Herbert
999d625e76
Fix realm migration potentially failing for users that haven't run osu! in a long time
...
As reported at https://github.com/ppy/osu/discussions/15530 .
2021-11-09 14:51:10 +09:00
Salman Ahmed
771bcbf868
Rename one more clashing variable
2021-11-05 12:24:07 +03:00
Dean Herbert
846c80f12c
Rename remaining clashing variables to appease CI somewhere
2021-11-05 17:02:24 +09:00
Dean Herbert
7772a97cf7
Add helper function to get realm class names rather than hard-coding each time
2021-11-05 17:01:00 +09:00
Dean Herbert
7acc4a4708
Refactor realm migrations to be a touch more legible
2021-11-04 18:57:54 +09:00
Dean Herbert
777b2cbcc4
Add realm migration for new author storage
2021-11-04 18:57:54 +09:00
Dean Herbert
3838fe5c6a
Fix typo in variable name
2021-10-29 11:39:15 +09:00
Dean Herbert
8d21f0b04b
Add migration to reset conflicting scroll speed key bindings
2021-10-29 11:14:22 +09:00
Dean Herbert
95837990f3
Apply some second-pass inspections that appeared after previous changes
2021-10-27 13:09:30 +09:00
Dean Herbert
6944151486
Apply batch fixing of built-in types using var
2021-10-27 13:04:41 +09:00
Dan Balasescu
08f3bc3f44
Merge pull request #15120 from peppy/realm-importer
...
Implement realm beatmap importer
2021-10-20 16:44:16 +09:00
Dean Herbert
d3ab45084d
Fix realm migration potentially failing from older releases
2021-10-19 14:19:58 +09:00
Dean Herbert
6904938dc1
Merge branch 'realm-indexed-online-id' into realm-importer
2021-10-18 16:14:37 +09:00
Dean Herbert
88a575462c
Work around weird null inspection
2021-10-18 16:11:55 +09:00
Dean Herbert
2c5ba1d8e2
Change OnlineID
to non-nullable to allow for indexing in Realm
2021-10-18 15:53:40 +09:00
Dean Herbert
d95a62fa56
Add models and stores for beatmap manager requirements
2021-10-15 16:58:41 +09:00
Dean Herbert
818fac6ac8
Make realm a non-drawable component to better order disposal
...
Until now, the `RealmContextFactory` would be disposed as part of the
drawable hierarchy. This is too early, as it may be being used by higher
level components (like `ConfigManager`s, see #15115 ) that perform final
operations after the drawables have been disposed.
Seems to make sense moving this out of the drawable hierarchy and in
line with how we were doing things with EF.
2021-10-15 13:58:16 +09:00
Dean Herbert
f43badabf4
Add back update thread verification in RealmContextFactory
2021-10-11 15:20:12 +09:00
Dean Herbert
74841cf1a9
Merge branch 'update-realm-context-factory' into realm-context-factory-safer-blocking
2021-10-01 03:54:31 +09:00
Dean Herbert
b51fd00ba3
Guard against disposal in all context retrievals
2021-10-01 03:46:53 +09:00
Dean Herbert
8557530cd5
Add back main context locking
2021-10-01 03:45:00 +09:00
Dean Herbert
cfd3bdf888
Ensure realm blocks until all threaded usages are completed
2021-10-01 01:34:35 +09:00
Dean Herbert
9fa901f6aa
Refine RealmContext
implementation API
2021-09-30 23:56:38 +09:00
Dean Herbert
f510ef9153
Move previousContext
assign within lock
to make things look safer
...
Not an actual requirement, but no harm.
2021-07-05 10:49:56 +09:00
Bartłomiej Dach
3291f15dcc
Mention GetForWrite()
as another alternative to Context
accesses
2021-07-04 12:08:15 +02:00
Dean Herbert
3ec7dc3bb9
Update tests in line with thread safety check
2021-07-04 17:59:39 +09:00
Dean Herbert
567e9f33a9
Fix thread safety of realm Refresh
operation
...
Due to the lack of locking, there was a chance the the update thread
`context` was retrieved just before the `flushContexts` call, followed
by `.Refresh()` being run while the blocking behaviour was invoked.
This can be seen in test failures such as
https://ci.appveyor.com/project/peppy/osu/builds/39859786/tests .
As an aside, I tried multiple different methods to avoid `lock()` on the
update thread but they felt flaky. The overhead of lock when there's no
contention is reportedly around 30-50ns, so likely not of concern. We
can address it at a later point if it becomes one.
2021-07-04 16:24:43 +09:00
Dean Herbert
2f1203085b
Also add logging of realm block/flush operations
2021-06-29 20:23:25 +09:00
Dean Herbert
d4ea73d727
Simplify disposal exceptions
2021-06-28 16:17:09 +09:00
Dean Herbert
f78cedd0e1
Reorder methods and add xmldoc for BlockAllOperations
2021-06-28 16:16:40 +09:00
Dean Herbert
90f0bc87f5
Add safety against double disposal
2021-06-28 16:12:21 +09:00
Dean Herbert
842f033522
Remove no longer necessary exception
2021-06-28 16:11:55 +09:00
Dean Herbert
c281e43cd8
Remove Dispose()
special case and add explicit exception to make debugging issues non-deadlock
2021-06-28 15:04:14 +09:00
Dean Herbert
63ab40ec24
Fix potential deadlocking behaviour (and convert ResetEvent
to Semaphore
)
2021-06-24 14:37:26 +09:00
Dean Herbert
ecde6137e0
Add missing active usage counter increment
2021-03-31 15:16:01 +09:00
Dean Herbert
d69a4914e0
Add method to block all realm access during migration operation
2021-01-22 17:28:47 +09:00
Dean Herbert
47a9d2b1c2
Add missing licence header
2021-01-21 20:53:16 +09:00
Dean Herbert
34a7ce912e
Correctly close context before attempting migration
2021-01-21 19:02:09 +09:00
Dean Herbert
f6c2009509
Remove unused using
2021-01-19 20:10:10 +09:00
Dean Herbert
68f2e7f61a
Use realm support for Guid
2021-01-19 18:22:36 +09:00
Bartłomiej Dach
ddc63662ba
Dispose realm in RealmWriteUsage cleanup
2021-01-16 16:39:04 +01:00
Dean Herbert
3e366b1f15
Ensure the main realm context is closed when the factory is disposed
2021-01-15 14:26:06 +09:00
Dean Herbert
8a08d3f4ef
Fix transactions not actually being committed
2021-01-14 16:13:10 +09:00
Dean Herbert
af1509d892
Remove unused variable (but add back pending writes counter)
2021-01-14 15:51:19 +09:00
Dean Herbert
8442b34e84
Tidy up write usage class
2021-01-13 18:36:37 +09:00
Dean Herbert
542f535247
Pull out thread local contexts and have main realm refresh in update loop
2021-01-13 18:36:37 +09:00
Dean Herbert
192e58e0c6
Update all read queries to use direct realm subscriptions/queries
2021-01-13 18:36:37 +09:00