Dean Herbert
91e0d1021f
Merge branch 'master' into fix-out-of-order-events-on-block-fail
2022-01-26 15:21:10 +09:00
Dean Herbert
cd71ec0edd
Remove ILive<>
interface (and use abstract Live<>
instead)
2022-01-26 13:38:56 +09:00
Dean Herbert
d37c3c463e
Move statistics to static class
2022-01-26 13:29:12 +09:00
Dean Herbert
c7947b3489
Add statistics for Live
usage
2022-01-26 12:42:24 +09:00
Dean Herbert
56b06f34f0
Fix RealmLive
not refetching if update thread context was closed at some point
2022-01-26 12:32:34 +09:00
Dean Herbert
d76822b685
Avoid creating realm contexts or refetching when accessing RealmLive
from the update thread
2022-01-26 12:32:34 +09:00
Dean Herbert
4a9f4eecba
Use blocking calls to SynchronizationContext
to guarantee order of execution
2022-01-25 20:49:52 +09:00
Dan Balasescu
d8270fe14f
Merge pull request #16604 from peppy/less-async-import
...
Remove `Task` from the inner-most `Import` method in `RealmArchiveModelImporter`
2022-01-25 16:47:07 +09:00
Dean Herbert
1bb1366c9f
Fix notification reset events potentially arriving out of order if a block operation times out
2022-01-25 16:26:06 +09:00
Dan Balasescu
7f2e66298b
Merge branch 'master' into realm-subscription-tracking
2022-01-25 16:03:21 +09:00
Dean Herbert
778d2a71b4
Remove Task
from the inner-most Import
method in RealmArchiveModelImporter
...
One of my pending work items for post-realm merge.
The lowest-level import task is no longer asynchronous, as we don't want
it to span multiple threads to allow easier interaction with realm.
Removing the `Task` spec simplifies a heap of usages.
Individual usages should decide whether they want to run the import
asynchronously, by either using an alternative override or spooling up a
thread themselves.
2022-01-25 15:30:29 +09:00
Dean Herbert
5fb9b58c9b
Add tracking of total subscriptions
2022-01-25 14:51:41 +09:00
Dean Herbert
9ad4d66e4d
Merge branch 'realm-clean-up' into realm-block-timeout-assert-failure
2022-01-25 13:58:36 +09:00
Dean Herbert
a5c76a9647
Fix a few more cases of "context" terminology usage
2022-01-25 13:56:47 +09:00
Dean Herbert
d7342880f5
Update remaining cases of clashes with realm.Write
and realm.RegisterForNotifications
2022-01-25 13:09:48 +09:00
Dean Herbert
e23b10e6a5
Update remaining cases of clashing variable name in realm.Run(realm..
2022-01-25 13:04:05 +09:00
Dean Herbert
6f4c337a56
Fix a failed BlockAllOperations
leaving update realm in unretrieved state
...
If the operation timed out on..
```csharp
throw new TimeoutException(@"Took too long to acquire lock");
```
..from an update thread, it would not restore the update context.
The next call would then fail on the assert that ensures a non-null
context in such cases.
Can add test coverage if required.
2022-01-24 20:53:29 +09:00
Dean Herbert
f30894840c
Update terminology to realm "instance" rather than "context"
...
This matches the terminology used by realm themselves, which feels
better.
2022-01-24 20:38:38 +09:00
Dean Herbert
6eb2c28e41
Rename RealmContextFactory
to RealmAccess
2022-01-24 20:38:07 +09:00
Dan Balasescu
bb54ad9ad8
Merge pull request #16547 from peppy/realm-stable-subscriptions
...
Fix realm subscriptions getting lost after a context recycle
2022-01-24 20:20:04 +09:00
Dean Herbert
66c5d77d63
Allow realm migration to run again if interrupted halfway
2022-01-24 18:55:15 +09:00
Dean Herbert
9afa034296
Fix attempt to revive update thread realm context from non-update thread
2022-01-24 18:36:16 +09:00
Dean Herbert
9ff9611296
Merge branch 'master' into realm-stable-subscriptions
2022-01-24 18:25:47 +09:00
Dean Herbert
e3083c2477
Fix copy pasted xmldoc
2022-01-24 18:05:30 +09:00
Dean Herbert
bf5bf8d1fd
Rename dictionaries to match methods
2022-01-24 17:58:53 +09:00
Dean Herbert
f4e7211ef1
Add xmldoc for RegisterForNotifications
2022-01-24 17:52:36 +09:00
Dean Herbert
abf14f0982
Lock unregistration for sanity
2022-01-24 17:46:53 +09:00
Dean Herbert
52cd906af6
Move context retrieval inside lock
2022-01-24 17:45:31 +09:00
Dean Herbert
cb319cebdb
Refactor naming and add more comments to help understanding in RealmContextFactory
subscription logic
2022-01-24 14:48:55 +09:00
Dean Herbert
40aa873190
Rename register methods to better explain their purpose
2022-01-24 14:37:36 +09:00
Dean Herbert
997c13f643
Add locking over realmSubscriptionsResetMap
for sanity
2022-01-24 13:36:51 +09:00
Dean Herbert
deb1670862
Use Array.Empty
instead of constructed list
2022-01-23 23:18:50 +09:00
Dean Herbert
249f0f9697
Add more lengthy comment explaining cyclic avoidance
...
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
2022-01-23 23:15:39 +09:00
Dean Herbert
5e7993c35a
Post disposal to synchronisation context
2022-01-23 20:43:25 +09:00
Dean Herbert
61cef42be9
Proof of concept realm subscriptions via Register
2022-01-23 20:28:04 +09:00
Dean Herbert
f39ff1eacb
Add unregistration on blocking
...
This is the first part of the requirement of sending a `ChangeSet` event
to ensure correct state during blocking time
2022-01-23 20:27:57 +09:00
Dean Herbert
70a120ea8a
Add missing lock coverage when using subscriptionActions
dictionary
2022-01-23 18:00:24 +09:00
Bartłomiej Dach
7e68371d28
Move log statement about migration completed closer to rest of migration code
2022-01-22 14:20:28 +01:00
Bartłomiej Dach
1b2cca4a0d
Merge branch 'master' into realm-migration-ui
2022-01-22 13:52:19 +01:00
Bartłomiej Dach
c99f227879
Remove no longer used resolved storage
2022-01-22 13:48:49 +01:00
Dean Herbert
6a076a684e
Merge branch 'realm-context-use-update-when-feasible' into realm-stable-subscriptions
2022-01-22 13:14:25 +09:00
Dean Herbert
cdcf0947e6
Merge branch 'master' into realm-context-use-update-when-feasible
2022-01-22 12:09:18 +09:00
Dean Herbert
b23f4674b1
Update outdated exception message
...
Co-authored-by: Salman Ahmed <frenzibyte@gmail.com>
2022-01-22 12:02:18 +09:00
Dean Herbert
daed0b04dc
Remove using statements
2022-01-22 11:54:40 +09:00
Dean Herbert
855ef3fa92
Create backup before any realm contexts are used
2022-01-22 11:52:46 +09:00
Dean Herbert
8ef50ff42d
Add safety to ensure RealmLiveUnmanaged
is not used with managed instances
2022-01-22 02:13:08 +09:00
Dean Herbert
ad3a01dc06
Use a more reliable method of reviving the update thread realm after blocking
2022-01-21 22:44:56 +09:00
Dean Herbert
3b11235d3c
Fix potentially cyclic subscription registration if a subscription's delegate accesses Context
2022-01-21 20:45:10 +09:00
Dean Herbert
1f157d729d
Update existing subscriptions to new style
...
Fix missing detach calls in `MusicController`
2022-01-21 20:05:03 +09:00
Dean Herbert
45aea9add5
Implement full subscription flow
2022-01-21 19:06:23 +09:00
Dean Herbert
18bf690a30
Add Register
method for subscription purposes and update safeties
2022-01-21 19:06:18 +09:00
Dean Herbert
8f1dfa33a2
Merge branch 'master' into realm-context-use-update-when-feasible
2022-01-21 18:03:09 +09:00
Dean Herbert
81b5717ae7
Fix RealmLive
failing to retrieve due to lack of refresh
2022-01-21 17:33:03 +09:00
Dean Herbert
d2655c0825
Fix RealmLive
not necessarily being in refreshed state due to potentially using update context
2022-01-21 17:27:30 +09:00
Dean Herbert
114c9e8c1f
Update all usages of CreateContext
to use either Run
or Write
2022-01-21 17:27:08 +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
5622d2ba4f
Show realm migration progress at Loader
2022-01-21 14:56:49 +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
079b2dfc42
Create backup of databases before opening contexts
...
Attempt to avoid file IO issues.
Closes #16531 .
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
ccddf9b47d
Avoid constructor overhead for realm BeatmapSetInfo
parameterless constructor
2022-01-20 17:03:44 +09:00
Dan Balasescu
64fe7d8dd3
Merge pull request #16520 from peppy/refresh-after-migrate
...
Improve realm migration performance further
2022-01-20 14:38:23 +09:00
Dean Herbert
a27a3b308c
Remove duplicate setters
2022-01-20 04:34:00 +09:00
Dean Herbert
fad66d7682
Backup collections alongside main databases when migrating to realm
2022-01-19 16:31:36 +09:00
Dean Herbert
aa93042aa3
Centralise backup code and also run on skin/settings migrations
2022-01-19 16:31:36 +09:00
Dean Herbert
fd5198d667
Avoid using parameterless constructors in migration code
...
Minor performance improvement (less garbage).
2022-01-19 16:22:18 +09:00
Dean Herbert
42736c9995
Add transactional committing of scores/beatmaps
...
This helps slightly with performance, allows better monitoring via realm
studio, but most importantly greatly reduces filesize.
fully compacted: 109M
transaction size 100: 115M
transaction size 1000: 123M
transaction size 10000: 164M
single transaction: 183M
With a transaction size of 100 there is a performance reduction, so 1000
seems to be the best middle-ground.
2022-01-19 16:08:48 +09:00
Dean Herbert
973836484c
Avoid using a write context for EF migration
...
This reduces a stall delay as EF tries to process changes over tracked
objects during disposal of the context.
2022-01-19 15:56:58 +09:00
Dean Herbert
faec62be51
Force a realm refresh after migration
...
This really shouldn't have much effect as it will be run in the first
`Update` method and is probably a noop (we are already pointing to the
newest version due to just performing writes), but seems like a safe addition.
In general `Realm.Refresh()` only really does anything when there's multithreaded
usage and notifications to be sent.
2022-01-19 15:56:58 +09:00
Dan Balasescu
fdf65aa2ff
Merge pull request #16502 from peppy/realm/remove-ef-migrations
...
Remove all EF migrations and helper methods
2022-01-19 14:43:45 +09:00
Dan Balasescu
3407b34b11
Merge branch 'master' into realm/remove-ef-migrations
2022-01-19 14:01:34 +09:00
Dan Balasescu
0b1736def6
Merge branch 'master' into realm-integration/faster-migration
2022-01-19 13:54:14 +09:00
Dan Balasescu
9c8f7795b7
Merge pull request #16510 from peppy/optimise-set-detach-part-2
...
Avoid file retrieval overhead when detaching `BeatmapSetInfo`
2022-01-19 13:53:34 +09:00
Dan Balasescu
a0336c6fc2
Merge pull request #16495 from peppy/realm-integration/reinit-on-corrupt
...
Add support for starting with a fresh realm database if the existing one is not usable
2022-01-19 13:30:14 +09:00
Dan Balasescu
2556f1cb87
Merge branch 'master' into optimise-set-detach-part-2
2022-01-19 13:20:38 +09:00
Dan Balasescu
d663fcd045
Merge pull request #16508 from peppy/optimise-set-detach
...
Create separate automapper configurations to reduce cyclic detach overhead
2022-01-19 13:20:25 +09:00
Dean Herbert
d440197fb3
Merge branch 'master' into realm-integration/faster-migration
2022-01-19 12:56:42 +09:00
Dean Herbert
ad4d9789ad
Merge branch 'master' into realm-integration/reinit-on-corrupt
2022-01-19 12:31:56 +09:00
Dan Balasescu
f6f44029e8
Merge pull request #16507 from peppy/more-ingore-rules
...
Add some missing `IgnoredAttributes` to reduce automapper overhead
2022-01-19 12:26:37 +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
195534a1d2
Only output "successful" messages when copy actually occurred
2022-01-19 10:31:13 +09:00
Dean Herbert
e1a35714be
Add notification for debug builds when database migration occurs
2022-01-19 10:31:10 +09:00
Dean Herbert
04e9ffa966
Freshen some comments
2022-01-19 10:20:56 +09:00
Dean Herbert
64a023665e
Avoid taking more than one backup per migration run
2022-01-19 10:20:56 +09:00
Dean Herbert
761e161eec
Add comment explaining ignore rule
2022-01-19 09:44:21 +09:00
Dean Herbert
60b80c88b6
Avoid file retrieval overhead when detaching BeatmapSetInfo
...
It seems that no usages of `BeatmapSetInfo` detaches require files - a
`WorkingBeatmap` is always obtained before doing further lookups.
Therefore we can omit this include unless the detaching object is a
`BeatmapInfo`. A refetch is performed when retrieving a
`WorkingBeatmap` to complete the equation.
2022-01-19 00:49:18 +09:00
Dean Herbert
f2b151023e
Create separate automapper configurations to reduce cyclic detach overhead
...
This optimises the `BeatmapSetInfo` detach operation by avoiding
detaching `BeatmapSetInfo.Beatmaps[].BeatmapSetInfo` a second time over.
2022-01-19 00:03:24 +09:00
Dean Herbert
67bf95bc91
Remove all usage of AuthorString
2022-01-18 23:30:40 +09:00
Dean Herbert
6b0bf38c93
Use a single EF context to avoid scores getting cascade deleted along the way
2022-01-18 20:47:53 +09:00
Dean Herbert
6ddd2d59d3
Remove EF helper methods
2022-01-18 20:44:26 +09:00
Dean Herbert
519f7e6ad2
Don't bother with removing from EF as the file is going to be deleted anyway
2022-01-18 19:17:47 +09:00
Dean Herbert
3b0977903b
Use IQueryable
directly to avoid insane overheads
2022-01-18 19:17:47 +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
9a43ed742b
Update automapper spec in line with v11
...
See https://docs.automapper.org/en/latest/11.0-Upgrade-Guide.html for
more details.
2022-01-18 15:23:28 +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
cf30d48721
Add more logging during migration process
2022-01-18 14:21:33 +09:00
Dean Herbert
798482c941
Create backups before deleting scores and beatmaps from EF database
2022-01-18 14:21:33 +09:00
Dean Herbert
b1a75ce480
Permanently delete client.db
after migration completes
2022-01-18 14:17:43 +09:00
Dean Herbert
a714941f93
Rename EF variable to make reading code easier
2022-01-18 14:06:22 +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
2f2c498477
Fix importer not considering that some EF beatmaps have no local metadata
2022-01-14 23:31:42 +09:00
Dean Herbert
2840a71dda
Uncomment EF deletion lines in migrations
2022-01-13 18:28:00 +09:00
Dean Herbert
b610d2db12
Add EF to realm beatmap migration
2022-01-13 18:23:18 +09:00
Dean Herbert
45a23e5a43
Add EF to realm score migration
2022-01-13 18:23:18 +09:00
Dean Herbert
c61419dfe5
Fix scores not using correct filename/display strings
...
I've updated all cases where we should have been using
`GetDisplayString()` anyway, but left the `ToString()` implementations
in place for safety. They should probably be removed in the future.
2022-01-13 16:56:11 +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
7baff18764
Add back PerformRead
return safety by checking IsManaged
status of returned data
2022-01-13 13:14:44 +09:00
Dean Herbert
085893c9b4
Fix stray bracket
2022-01-13 13:03:57 +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
f24b2b1be3
Make copying detached changes to realm only exposed for BeatmapSet
...
Also fixes remaining issues with the copy process.
2022-01-12 17:49:11 +09:00
Dean Herbert
a4de0f93fa
Move manager Update
methods to be explicit to where they are still used by legacy code
...
Also fixes skin hash repopulation being completely broken.
2022-01-12 17:49:11 +09:00
Dean Herbert
580ad03f8d
Combine mapper configurations and add more explanation about special cases
2022-01-12 17:49:11 +09:00
Salman Ahmed
6db3c32dd1
Handle automapper realm cyclic references via AfterMap
s
...
This may not be the cleanest solution, but there don't seem to be any
way towards this either.
- `UseDestinationValue` has been inherited by default as noted in
https://docs.automapper.org/en/stable/10.0-Upgrade-Guide.html#usedestinationvalue-is-now-inherited-by-default , and its behaviour in this case would be using the nested **managed** realm object for the destination member rather than creating an unmanaged version.
- `MaxDepth` already sets `PreserveReferences` so there's no point of using it.
- `MaxDepth` should probably not be set for all maps, only for those with
cyclic references, to avoid the expensive overhead of `PreserveReferences`, as mentioned in https://docs.automapper.org/en/stable/5.0-Upgrade-Guide.html#circular-references .
That aside, `MaxDepth` should actually only be set to `1` for
`BeatmapSetInfo` mapping, because we don't want AutoMapper to create a
nested instance of `BeatmapSetInfo` in each mapped/detached beatmap, but
for some reason, doing that will cause automapper to not map any beatmap
inside the set and leave it with 0 beatmaps.
While on the other hand, using `MaxDepth(2)` for `BeatmapSetInfo` works,
but creates an unused instance of a `BeatmapSetInfo` inside each mapped
beatmap, which may not be ideal.
For `BeatmapInfo`, it has to be `MaxDepth(2)`, in which the first
`BeatmapInfo` depth would be itself (when detaching a beatmap), and the
second would be nested beatmaps inside the mapped/detached
`BeatmapSetInfo` within the beatmap. (note that when detaching a beatmap
set, the unused instance of `BeatmapSetInfo` within each beatmap of that
beatmap set doesn't also have a list of unused beatmaps as one might expect from the depth specification, it surprisingly has 0 beatmaps)
This causes it to create an unused instance of `BeatmapInfo` in the beatmap set resembling the root mapped/detached beatmap, but that one might be inevitable.
2022-01-12 17:49:11 +09:00
Dean Herbert
e0c59f4b3c
Localise EF context factory usage to migration only
2022-01-12 17:49:11 +09:00
Dean Herbert
f986c3ebd4
Add basic write support via automapper
2022-01-12 17:49:11 +09:00
Dean Herbert
aaefd72c69
Handle ignored mappings locally in Detach
configuration
2022-01-12 17:00:17 +09:00
Dean Herbert
2b8706b6ce
Detach and reattach scores to make work
2022-01-12 17:00:16 +09:00
Dean Herbert
8461eaab46
BeatmapSetInfo
detach support
2022-01-12 17:00:16 +09:00
Dean Herbert
fe8a5e867d
Remove updated/removed flow method mapping
2022-01-12 17:00:16 +09:00
Dean Herbert
8d943b5709
Fix many shortcomings and compatibility issues with EF classes post-rename
2022-01-12 17:00:16 +09:00
Dean Herbert
00e3af3366
Update model manager and many related classes to get things compiling again
2022-01-12 17:00:00 +09:00
Dean Herbert
d70e292828
Remove old EF classes
2022-01-12 16:57:27 +09:00
Dean Herbert
2a4bee61dd
Update many score-related classes to move closer to being able to persist to realm
2022-01-12 16:57:27 +09:00
Dean Herbert
3da762e145
Replace EF ScoreInfo
with realm version
...
May contain errors.
2022-01-12 16:57:27 +09:00
Dean Herbert
b8cd3cdbbc
Various updates to ruleset and primary key usages to move closer to realm support
2022-01-12 16:57:13 +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
0b6c4497bd
Rename EF classes to allow for shit to hit the fan
2022-01-12 16:39:36 +09:00
Dan Balasescu
af9fad00c3
Merge branch 'master' into async-deadlock-safety
2022-01-10 16:11:09 +09:00
Dean Herbert
d072f1d08d
Add mention to detach methods of only running once
2022-01-10 13:09:26 +09:00
Dean Herbert
00177a3ae1
Update usages to new naming
2022-01-06 22:54:43 +09:00
Dean Herbert
3ea7588a91
Update continuation usages to use GetCompletedResult
2022-01-06 22:53:07 +09:00
Dean Herbert
73b40e6833
Replace usage of .Result
with .WaitSafelyForResult
2022-01-04 11:51:41 +09:00
Bartłomiej Dach
ca7303a50a
Fix online lookup cache not clearing completed task on early return
...
The task not being cleared in the early return path would cause
`pendingRequestTask` to become stuck as a completed task, and
`queryValue()` would not recreate it due to the null check there,
therefore stalling all lookups forevermore until a game restart.
2021-12-21 11:13:41 +01:00
Bartłomiej Dach
ee89d8643e
Extract abstract implementation of online lookup cache
2021-12-21 11:12:51 +01:00
Dean Herbert
04cfae9bde
Fix "Random Skin" text not showing up correctly
2021-12-18 16:26:15 +09:00
Dean Herbert
a9dbcd92a1
Split out unmanaged implementation of RealmLive
into its own class
2021-12-16 15:23:55 +09:00
Dean Herbert
441b7baa93
Provide a realm factory to usages of ToLive
/RealmLive
2021-12-14 14:26:34 +09:00
Dean Herbert
f7c5a3f506
Use similar method of consuming OnlineID
as done in beatmap classes
2021-12-10 18:34:31 +09:00
Dean Herbert
8d9c37a825
Merge branch 'master' into primary-key-consistency
2021-12-08 21:34:38 +09:00
Bartłomiej Dach
4278a320e4
Fix skin setting resetting every launch
...
The reason this was happening was an unfortunate oversight in the
migration logic. The code that was attempting to parse the skin settings
as `int` was firing regardless of whether a skin migration from EF to
realm had already occurred. If it had occurred, the skin setting would
contain a GUID rather than an integer, and therefore fail to parse, and
therefore implicitly fallback to a EF skin ID of 0 which would be the
default skin.
Fix by not running the setting migrating logic at all when there are no
EF skins to migrate.
2021-12-06 20:12:02 +01:00
Dean Herbert
ae3038ead4
Overwrite existing files if AddFile
is called with an existing filename
2021-12-02 17:18:06 +09:00
Dean Herbert
65f0a80c97
Merge branch 'master' into realm-integration/skins-rebase
2021-12-02 13:37:20 +09:00
Bartłomiej Dach
8bef50cbba
Revert "Refactor migration precondition to read better"
...
Realm cannot translate `.All()` LINQ queries.
This reverts commit 0e0e8c25e8
.
2021-12-01 19:39:44 +01:00
Dan Balasescu
685bdd522e
Replace 'skin' in comments with 'instance'
2021-12-01 20:17:38 +09:00
Dan Balasescu
c225f8f84c
Merge branch 'master' into realm-subscribe-helper-methods
2021-12-01 20:15:21 +09:00
Dan Balasescu
af704dfe5b
Merge pull request #15878 from peppy/beatmap-lookup-cache
...
Cache beatmap metadata lookups used by multiplayer
2021-12-01 20:13:21 +09:00
Dean Herbert
bf5a186a2b
Add early abort to avoid sending empty lookup requests
2021-12-01 17:47:16 +09:00
Dean Herbert
81f82c24c3
Use new API endpoint to do batch lookups
2021-12-01 17:45:41 +09:00
Dean Herbert
09817ff161
Add missing returns
additional documentation to main method call
2021-12-01 15:27:10 +09:00
Dean Herbert
4306420922
Add extension methods to add extra safety to realm subscriptions
...
Also adjusts the naming and documentation to make it (hopefully) easier
to understand what this method/process implies.
2021-12-01 15:09:53 +09:00
Dean Herbert
0e0e8c25e8
Refactor migration precondition to read better
2021-12-01 12:48:49 +09:00
Dean Herbert
ef3d0ee0db
Merge branch 'master' into realm-integration/skins-rebase
2021-11-30 19:59:59 +09:00
Dean Herbert
87883f1fe4
Add BeatmapLookupCache
2021-11-30 19:28:45 +09:00
Dan Balasescu
8fdb9ab4e5
Merge branch 'master' into realm-integration/live-queryable-fix
2021-11-30 18:54:14 +09:00
Dan Balasescu
daa7135381
Merge branch 'master' into realm-nested-context-creation-deadlock-fix
2021-11-30 18:01:00 +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
6bf9327228
Add linking property on SkinFileInfo
to allow EF to understand the link post-rename
2021-11-30 15:17:16 +09:00
Dean Herbert
6b0999052f
Merge branch 'master' into realm-integration/live-queryable-fix
2021-11-30 12:02:37 +09:00
Dean Herbert
f3f77fa053
Update missed xmldoc/comments
2021-11-30 11:56:53 +09:00
Dean Herbert
35d68d6ab0
Remove all optimisations from RealmLive
2021-11-30 11:47:29 +09:00
Dan Balasescu
823552a5e8
Merge pull request #15856 from peppy/simplify-replace-file
...
Remove the ability to specify a filename in `ReplaceFile`
2021-11-29 20:49:38 +09:00
Dan Balasescu
8a188b74b1
Merge pull request #15850 from peppy/realm-integration/misc-qol
...
Apply a couple of realm related documentation/interface changes
2021-11-29 18:58:15 +09:00
Dean Herbert
0bcfb8e199
Fix regression in implementation of fix
2021-11-29 18:52:29 +09:00
Dean Herbert
cd0c811ab1
Add the ability to call ToString
on a RealmLive
to get the underlying object's implementation
2021-11-29 18:28:25 +09:00
Dean Herbert
5db7cf23d3
Add pending deletion skin cleanup
2021-11-29 18:28:25 +09:00
Dean Herbert
e283379f0e
Replace EF SkinInfo
with realm implementation
2021-11-29 18:28:25 +09:00
Dean Herbert
348d1d0be9
Don't dispose fetched realm instance when using RealmLive.Value
...
See https://github.com/realm/realm-dotnet/discussions/2734#discussioncomment-1705038 for reasoning.
2021-11-29 18:28:25 +09:00
Dean Herbert
1dd5e1ca89
Remove RealmLive
context re-fetch optimisation for now
2021-11-29 18:28:25 +09:00
Dean Herbert
c411a755c7
Merge branch 'realm-nested-context-creation-deadlock-fix' into realm-integration/compiled
2021-11-29 18:28:07 +09:00
Dean Herbert
29f1ad10ba
Merge branch 'realm-integration/misc-qol' into realm-integration/compiled
2021-11-29 18:28:03 +09:00
Dean Herbert
1cfcd33b07
Merge branch 'simplify-replace-file' into realm-integration/compiled
2021-11-29 18:28:02 +09:00
Dean Herbert
23fded4a3a
Fix potential oversight in semaphore release logic
2021-11-29 18:26:37 +09:00
Dean Herbert
a7e4e7be3a
Remove the ability to specify a filename in ReplaceFile
2021-11-29 18:11:51 +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
6dcc244e21
Fix RealmLive
not working is data is attached to realm post-ToLive
call
2021-11-29 17:34:58 +09:00
Dean Herbert
c98451a7bf
Fix potential deadlock on nested context creation requests
2021-11-29 16:29:53 +09:00
Dean Herbert
cb8fa80352
Don't dispose fetched realm instance when using RealmLive.Value
...
See https://github.com/realm/realm-dotnet/discussions/2734#discussioncomment-1705038 for reasoning.
2021-11-29 14:25:43 +09:00
Dean Herbert
e40e5096ea
Remove RealmLive
context re-fetch optimisation for now
2021-11-29 14:25:43 +09:00
Dean Herbert
21e8ab8357
Return ILive
from ToLive
calls instead of realm-typed instance
2021-11-29 14:12:22 +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
Dan Balasescu
5e53f51c99
Merge pull request #15812 from peppy/realm-live-unmanaged-fetch-fix
...
Avoid attempting to fetch a non-managed `RealmLive` instance from the realm backing
2021-11-26 15:37:58 +09:00
Dean Herbert
40d1b97af1
Avoid attempting to fetch a non-managed RealmLive
instance from the realm backing
...
For compatibility reasons, we quite often convert completely unmanaged
instances to `ILive`s so they fit the required parameters of a property
or method call. This ensures such cases will not cause any issues when
trying to interact with the underlying data.
Originally I had this allowing write operations, but that seems a bit
unsafe (when performing a write one would assume that the underlying
data is being persisted, whereas in this case it is not). We can change
this if the requirements change in the future, but I think throwing is
the safest bet for now.
2021-11-26 15:06:14 +09:00
Dean Herbert
13612c0d02
Add equality support to ILive
types
2021-11-26 14:56:16 +09:00
Dan Balasescu
f712aeee01
Merge pull request #15795 from peppy/realm-integration/separate-download-flow
...
Split out download logic from main manager classes
2021-11-25 20:59:23 +09:00
Dan Balasescu
d3a4890c31
Merge branch 'master' into realm-integration/stable-export-flow
2021-11-25 19:06:18 +09:00
Dean Herbert
e2ebcf7a26
Remove unnecessary manager parameter
...
Confused why I added this in the first place..
2021-11-25 18:36:03 +09:00
Dean Herbert
eeccf836ec
Remove unnecessary GameHost
parameter
2021-11-25 17:42:41 +09:00
Dean Herbert
79459c1aeb
Fix typo in class and variable names
2021-11-25 17:12:15 +09:00
Dean Herbert
ec9a09d5a4
Add missing licence headers
2021-11-25 16:56:19 +09:00
Dean Herbert
cc1b91e4bd
Split out legacy model export logic into LegacyModelExporter
classes
2021-11-25 16:41:12 +09:00
Dean Herbert
7488ccd5fe
Update all models to implement IHasNamedFiles
2021-11-25 16:41:12 +09:00
Dan Balasescu
6d60725b31
Merge branch 'master' into realm-integration/stable-import-flow
2021-11-25 16:36:02 +09:00
Dean Herbert
a0fa030f55
Rename base class to LegacyModelImporter
2021-11-25 16:33:04 +09:00
Dean Herbert
2df793ca22
Inline individual importers to avoid unnecessary construction for singular import types
2021-11-25 15:44:04 +09:00
Dean Herbert
9dcb20a821
Rename Stable
to Legacy
and add xmldoc
2021-11-25 15:39:05 +09:00
Dean Herbert
6cab7b877d
Move stable import handling into its own class
2021-11-25 15:36:58 +09: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
fd321109da
Remove unnecessary virtual
specification on Refresh
2021-11-25 14:06:12 +09:00
Dan Balasescu
1865227e08
Merge pull request #15773 from peppy/remove-model-file-list-inits
...
Initialise `IHasFiles<TFile>.Files` lists at construction time
2021-11-24 21:05:36 +09:00
Dean Herbert
052ed8f930
Add online status to RealmBeatmapSet
2021-11-24 18:48:02 +09:00
Dean Herbert
ddbd4f9473
Merge branch 'master' into remove-model-file-list-inits
2021-11-24 18:39:01 +09:00
Dan Balasescu
c4b5a07f4b
Merge branch 'master' into realm-move-data-migration-to-context-factory
2021-11-24 14:40:26 +09:00
Dean Herbert
99a139dc98
Initialise all file lists at construction time (and remove setter)
2021-11-24 13:56:21 +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
Dean Herbert
d94b27a8a2
Switch realm ruleset key bindings to use ruleset's ShortName
as key
2021-11-22 18:52:30 +09:00
Dean Herbert
329bae50b0
Switch realm ruleset configuration to use ruleset's ShortName
as key
2021-11-22 18:52:00 +09:00
Dean Herbert
ca26b6c540
Provide RealmContextFactory
with the EF RulesetStore
for migration purposes
2021-11-22 18:51:44 +09:00
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
83b4625bd5
Replace existing cases with new helper method
2021-11-19 22:15:41 +09:00
Dean Herbert
eecf6ad558
Add IsManaged
helper method to EF classes to match realm implementation
2021-11-19 21:56:06 +09:00
Dean Herbert
59e763467f
Move StoragePath
implementation to an extension method
2021-11-19 16:08:38 +09:00
Dean Herbert
726a0cc091
Merge branch 'master' into beatmap-collection-inteface-types
2021-11-16 15:31:10 +09:00
Dean Herbert
a4c11e8813
Use extension method to compare online IDs
2021-11-15 14:34:50 +09:00
Bartłomiej Dach
e66b637587
Merge branch 'master' into fix-android-score-imports
2021-11-12 11:40:15 +01:00
Dean Herbert
692e846acd
Rename BeatmapSetInfo.OnlineBeatmapSetID
to OnlineID
to match interface
2021-11-12 17:52:44 +09:00
Dean Herbert
6a098a8634
Rename BeatmapInfo.OnlineBeatmapID
to OnlineID
to match interface
2021-11-12 17:46:24 +09:00
Dean Herbert
adf81d7fcd
Add pathway to correctly handle stream-based imports which are not zip archives
2021-11-12 16:42:07 +09:00
Dean Herbert
ad8a710a69
Fix failed imports being incorrectly considered as successfully importing for notification purposes
2021-11-12 16:10:46 +09:00
Bartłomiej Dach
5ec8288508
Add GetDisplayString()
extension to handle all model interface types globally
2021-11-09 13:53:07 +01: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
Dean Herbert
78aef9ce86
Merge branch 'master' into remove-stupid-weak-reference-bindable-events
2021-11-08 13:35:49 +09:00
Dean Herbert
89cc2523ef
Fix incorrectly specified events
2021-11-06 22:31:49 +09:00
Dean Herbert
2881ce0f5a
Merge branch 'master' into remove-stupid-weak-reference-bindable-events
2021-11-06 14:08:39 +09:00
Dean Herbert
9a7c75508e
Merge branch 'master' into user-class-cleanup
2021-11-05 19:56:18 +09:00
Dean Herbert
54f72d68ca
Revert weird event flow in model manager/importers
2021-11-05 19:12:49 +09:00
Salman Ahmed
771bcbf868
Rename one more clashing variable
2021-11-05 12:24:07 +03:00
Dean Herbert
6c385ccd29
Move second generic to abstract
model downloader rather than interface type
2021-11-05 17:37:05 +09:00
Dean Herbert
99df37f32d
Add input generic type to IModelDownloader
2021-11-05 17:02:45 +09: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
1fe9bca819
Change ModelDownloader
's requirement to an IModelImporter
rather than IModelManager
2021-11-05 16:47:18 +09:00
Dean Herbert
b90f44493c
Remove importer inheritance from IModelManager
...
Now only exists in legacy implementations, to reduce inheritance
complexity of interfaces which are going to be used going forwards.
2021-11-05 16:45:38 +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
b9983add15
Rename User
to APIUser
and move to correct namespace
2021-11-04 18:21:31 +09:00
Dean Herbert
ca438a102d
Fix beatmap paths including invalid slash/backslash characters
2021-11-03 16:46:05 +09:00
Dan Balasescu
c51349de57
Merge pull request #15358 from peppy/online-id-potentially-zero
...
Add a note about `OnlineID` potentially being zero in non-autoincrement cases
2021-11-01 15:54:08 +09:00
Dean Herbert
19feae4a8e
Merge branch 'master' into beatmap-refactor/download-tracker
2021-11-01 13:15:36 +09:00
Bartłomiej Dach
b0c4fa662d
Merge branch 'master' into long-online-id-score-info
2021-10-30 14:35:30 +02:00
Dean Herbert
aff216840f
Add a note about OnlineID
potentially being zero in non-autoincrement cases
2021-10-29 16:54:03 +09:00
Dean Herbert
3b095e1626
Merge branch 'master' into beatmap-refactor/download-tracker
2021-10-29 11:50:54 +09:00
Dean Herbert
34d4715220
Allow for long
online IDs and implement in ScoreInfo
2021-10-29 11:48:36 +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
add39fbd4f
Merge branch 'master' into fix-skin-layout-editor-crash
2021-10-28 06:24:24 +09:00
Dean Herbert
617e6febb6
Refactor ModelDownloader
to allow for different OnlineID matching
2021-10-27 21:00:46 +09:00
Dean Herbert
9015ac6ba8
Implement new version of download tracker
2021-10-27 21:00:46 +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
Dean Herbert
370775af68
Fix some surrounding code formatting
2021-10-26 14:05:07 +09:00
Dean Herbert
26cf5370c3
Remove unused reader
parameter
2021-10-24 23:48:46 +09:00
Susko3
51c5d0aec7
Update to be in line with framework changes
2021-10-24 13:21:41 +02:00
Susko3
4a425b5c3e
Merge remote-tracking branch 'upstream/master' into use-ShowFileInNativeExplorer
2021-10-23 10:01:24 +02:00
Dean Herbert
eef9949a0a
Remove unnecessary branching around EF logic
2021-10-22 14:48:20 +09:00
Dean Herbert
59b7210efa
Revert disallowing imports with no files
...
While it is logical that we want this, from a testing perspective this is a bit of a nightmare to fix. Let's revisit at a later point in time.
2021-10-21 13:43:42 +09:00
Dean Herbert
9e6e41d7c0
Add migration to reset and repopulate existing skin hashes
2021-10-20 17:56:45 +09:00
Dean Herbert
439e90fce3
Disallow archive imports with no hashable files
2021-10-20 17:45:06 +09:00
Dean Herbert
789c715f13
Add skin.ini
write support to allow for more correct hashing
2021-10-20 17:45:06 +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
da750a74fc
Add xmldoc mention of valid OnlineID
values
2021-10-20 15:24:27 +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
3c4c9ab7a7
Move ICanAcceptFiles
specification to IModelImporter<TModel>
2021-10-18 14:25:51 +09:00
Susko3
25f172fae8
Update usages of OpenInNativeExplorer to use ShowFileInNativeExplorer
...
Also updates WrappedStorage to override ShowFileInNativeExplorer.
2021-10-17 12:56:29 +02:00
Dean Herbert
49969ac328
Add beatmap import and file store tests
2021-10-15 17:07:34 +09:00
Dean Herbert
d95a62fa56
Add models and stores for beatmap manager requirements
2021-10-15 16:58:41 +09:00
Dan Balasescu
05150b34e5
Merge pull request #15117 from peppy/update-present-import-post-import
...
Update one missed instance of `PresentImport`
2021-10-15 16:57:47 +09:00
Dean Herbert
e9c3d09e0e
Remove redundant specs
2021-10-15 16:27:16 +09:00
Dean Herbert
fdb734ac91
Also add spec directly to IModelImporter
2021-10-15 16:24:40 +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
93d7cdc509
Don't check whether the source realm was closed or not
...
Based on what we now know, this is not required, as long as there is
another realm context open on the same thread.
2021-10-13 15:50:06 +09:00
Dean Herbert
f5f0486e18
Merge branch 'master' into realm-live
2021-10-13 15:24:34 +09:00
Dan Balasescu
df5a76ad9d
Merge pull request #15041 from peppy/realm-file-store
...
Add realm `FileStore`
2021-10-13 13:54:56 +09:00
smoogipoo
cf10239e70
Add a few nullabilities and DCC excludes
2021-10-13 12:51:46 +09:00
Dean Herbert
f69a56a26a
Add test coverage of startup import sequence
2021-10-13 12:19:10 +09:00
Dean Herbert
e468bfb31c
Merge branch 'master' into realm-file-store
2021-10-12 23:11:02 +09:00
Dan Balasescu
7bb401b974
Merge pull request #15040 from peppy/realm-test-game-host
...
Update realm tests to run inside a `GameHost` to allow running on update thread
2021-10-12 21:16:06 +09:00
Dean Herbert
b01d82b3fd
Add RealmLive
implementation
2021-10-11 15:36:41 +09:00
Dean Herbert
6ca415da9f
Add basic realm models
...
Only the file related ones are really required outside of tests, but
seems like as good an opportunity as ever to get the rest of the models
into the game project.
2021-10-11 15:25:04 +09:00
Dean Herbert
f43badabf4
Add back update thread verification in RealmContextFactory
2021-10-11 15:20:12 +09:00
Dean Herbert
c7675be3ef
Fix typo in IModelImporter
's xmldoc
2021-10-11 15:12:51 +09:00
Dan Balasescu
4bbff2ebf7
Merge branch 'master' into new-interfaces
2021-10-06 11:38:17 +09:00
Dan Balasescu
9491e5a547
Merge pull request #14954 from peppy/rename-result-response
...
Rename `APIRequest.Result` to `Response`
2021-10-06 10:52:33 +09:00
Dean Herbert
1e4da81120
Fix import notifications not showing correct text
2021-10-05 17:14:09 +09:00
Dean Herbert
b41fa41c85
Rename APIRequest.Result
to Response
2021-10-05 14:28:56 +09:00
Dean Herbert
1d99bc280f
Merge branch 'master' into new-interfaces
2021-10-04 20:42:40 +09:00
Dean Herbert
63f0b0c932
Rename out of place interface name
2021-10-04 16:35:55 +09:00
Dean Herbert
857000b756
Mark IPresentImports
as covariant
2021-10-04 16:29:46 +09:00
Dean Herbert
3c15ef720f
Remove setter from IHasGuidPrimaryKey
interface
2021-10-04 16:26:28 +09:00
Dean Herbert
916342c837
Merge branch 'master' into importer-returns-live
2021-10-04 16:24:26 +09:00
Dan Balasescu
aca2f0c12d
Merge pull request #14901 from peppy/model-importer-split
...
Split importer interface out of `IModelManager`
2021-10-04 16:22:29 +09:00
Dean Herbert
682fe5be78
Merge branch 'master' into realm-context-factory-safer-blocking
2021-10-02 00:30:09 +09:00
Dean Herbert
b1f9bbdc69
Merge branch 'master' into model-importer-split
2021-10-02 00:29:29 +09:00
Dan Balasescu
a620b55d55
Merge pull request #14900 from peppy/model-downloader-split
...
Split `ArchiveModelManager` into two pieces
2021-10-01 23:16:09 +09:00
Dan Balasescu
d24f89fead
Merge pull request #14906 from peppy/update-realm-context-factory
...
Refine `RealmContext` implementation
2021-10-01 22:57:03 +09:00
Dean Herbert
a32f5d44e2
Improve clarity of xmldoc
...
Co-authored-by: Dan Balasescu <smoogipoo@smgi.me>
2021-10-01 22:23:51 +09:00
Dean Herbert
d309636460
Update all EF based models to implement new read only interfaces
2021-10-01 16:55:50 +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
a2e61883e3
Initial push to use ILive
in import process
2021-09-30 22:55:25 +09:00
Dean Herbert
66409147dc
Remove duplicate interface specification
2021-09-30 19:25:08 +09:00
Dean Herbert
c05a8fc4a2
Split importer interface out of IModelManager
2021-09-30 18:52:09 +09:00
Dean Herbert
3e3b9bc963
Split out IModelDownloader
and also split apart ScoreManager
2021-09-30 18:25:20 +09:00
Dean Herbert
0a00bc7795
Split out IPostNotifications
into an interface
2021-09-30 18:21:34 +09:00
Dean Herbert
5618c9933b
Expose more pieces of ArchiveModelManager
via interfaces
2021-09-30 16:44:39 +09:00
Dean Herbert
d4310f5d9a
Move database connection string operations local
...
In line with framework changes in
https://github.com/ppy/osu-framework/pull/4793 .
2021-09-27 17:32:41 +09:00
Dean Herbert
edb1230111
Fix potential nullref throw on failed startup
2021-09-16 22:48:09 +09:00
Dean Herbert
5bb741b4e8
Remove migration of key bindings
2021-09-15 17:04:38 +09:00
Dean Herbert
fed0e15cea
Fix typo in ArchiveModelManager
2021-08-23 20:23:46 +09:00
Dean Herbert
4bf22db4ff
Attempt to reduce skin lookup overhead where file access is not required
2021-08-17 00:23:30 +09:00
Dean Herbert
d9b5f235d8
Add xmldoc explaining thread safety limitations of IModelManager
"events"
2021-08-10 17:36:59 +09:00
Dean Herbert
459f9a0465
Handle nulls and fix missing documentation
2021-07-05 21:35:37 +09:00
Dean Herbert
9c311a6d8a
Add ability to lookup multiple users at once to UserLookupCache
2021-07-05 19:56:16 +09:00
Dean Herbert
1e4beddd2d
Disable foreign key enforcing at an sqlite level
2021-07-05 15:41:48 +09:00
Dan Balasescu
b82afaddc1
Merge pull request #13767 from peppy/fix-realm-refresh-race
...
Fix thread safety of realm `Refresh` operation
2021-07-05 13:53:29 +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
Bartłomiej Dach
b89521314f
Mention alternatives to Context
when not on update thread in xmldoc
2021-07-04 12:07:34 +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
Bartłomiej Dach
8a23dfa6f5
Fix optimised import path buffering events without flush
2021-07-03 17:58:12 +02:00
Dean Herbert
2f1203085b
Also add logging of realm block/flush operations
2021-06-29 20:23:25 +09:00
Dan Balasescu
a9084db665
Merge pull request #13673 from peppy/import-early-checksum-abort
...
Shortcut import process to speed up duplicate imports
2021-06-28 19:55:09 +09:00
Dan Balasescu
92fcf90768
Merge branch 'master' into import-early-checksum-abort
2021-06-28 19:29:08 +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
0d2bc4fc5f
Merge branch 'master' into fix-realm-state-change-crashes
2021-06-28 16:03:58 +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
a3946a1265
Fix typo in newly added xmldoc
...
Co-authored-by: Salman Ahmed <frenzibyte@gmail.com>
2021-06-28 14:07:21 +09:00
Dean Herbert
4d6002ab88
Remove redundant string interpolation (and mark all local logging strings as verbatim)
2021-06-28 12:16:15 +09:00
Dean Herbert
4a557e73a7
Add logging to help understand existing case skips better
2021-06-28 10:42:42 +09:00
Dean Herbert
90b87cbb9e
Add back unidirectional online id check
2021-06-28 10:11:27 +09:00
Dean Herbert
9a96cd4a1d
Revert "Remove comparison of online beatmap IDs during dedupe checks"
...
This reverts commit 15af28d2a0
.
2021-06-28 09:54:18 +09:00
Dean Herbert
e755dcc34d
Add log method for new flow
2021-06-27 20:37:12 +09:00
Dean Herbert
f470b7095d
Move private method down in class
2021-06-27 20:36:01 +09:00
Dean Herbert
f216404952
Fix missing undelete call on using existing
2021-06-27 20:22:48 +09:00
Dean Herbert
9120321731
Add comments mentioning shortcomings and avoid potential double check
2021-06-27 19:07:35 +09:00
Dean Herbert
44f875b802
Bypass optimised existing check in SkinManager
(due to custom hashing function)
2021-06-27 16:35:13 +09:00
Dean Herbert
e493685c14
Add optimised existing check earlier in import process
2021-06-27 16:34:40 +09:00
Dean Herbert
15af28d2a0
Remove comparison of online beatmap IDs during dedupe checks
2021-06-27 14:48:57 +09:00
Dean Herbert
d1f852d102
Make Populate
abstract to avoid unnecessary base call async complexity
2021-06-27 14:29:02 +09:00
Dean Herbert
63ab40ec24
Fix potential deadlocking behaviour (and convert ResetEvent
to Semaphore
)
2021-06-24 14:37:26 +09:00
Dean Herbert
df703b68ec
Merge branch 'master' into realm-key-binding-store
2021-05-25 13:41:48 +09:00
Dean Herbert
8f5b28d264
Fix "folder missing" message showing incorrectly for beatmaps folder
2021-05-20 13:56:18 +09:00
Lucas A
8530b31e39
Use bitshifts for enum values instead of literal values.
2021-05-17 21:02:45 +02:00
Lucas A
97952bc3f0
Fix backwards stable install resolution logic.
2021-05-17 18:39:04 +02:00
Lucas A
6110a847aa
Simplify import ordering logic by making beatmapImportTask non-nullable.
2021-05-17 16:30:13 +02:00
Lucas A
41fafdf643
Remove now unreachable code paths.
2021-05-17 12:55:59 +02:00
Lucas A
dabe8bd4c7
Fix code inspections and remove now unused code.
2021-05-17 12:55:58 +02:00
Lucas A
a7b740fd1d
Reword ImportFromStablePopup and display the popup regardless of whether a stable install is detected.
2021-05-17 12:55:58 +02:00
Lucas A
8ba50b1854
Bring back injected dependency incorrectly marked as unused.
2021-05-17 12:55:58 +02:00
Lucas A
481b0a0125
Add StableDirectoryLocationDialog
2021-05-17 12:55:57 +02:00
Lucas A
325a689d65
Order imports depending on beatmap imports if any is running.
2021-05-17 12:55:57 +02:00
Lucas A
851e33fd15
Hook up StableImportManager.
2021-05-17 12:55:57 +02:00
Lucas A
5d5b1e1f0e
Add StableImportManager
2021-05-17 12:55:56 +02:00
Dean Herbert
1742ee89e0
Fix incorrect xmldoc for DeleteFile
2021-05-11 18:39:14 +09:00
Dean Herbert
05e3a73a7d
Fix import cancellation not correctly being forwarded to import notification
2021-04-28 16:09:50 +09:00
smoogipoo
6560dc2d1f
Fix exported replays being wrapped in zip packages
2021-04-26 20:46:44 +09:00
Dean Herbert
b9ee63ff89
Remove public
keywords from interface implementations
2021-04-24 02:13:31 +09:00
Dean Herbert
ecde6137e0
Add missing active usage counter increment
2021-03-31 15:16:01 +09:00
Dean Herbert
37bf79e8a4
Remove unused automapper setup for the time being
2021-03-31 15:10:05 +09:00
Dean Herbert
f8cea5cae3
Merge branch 'master' into realm-migration-operation-blocking
2021-03-26 17:07:31 +09:00
Bartłomiej Dach
a16c0641b2
Revert EF Core to version 2.2
...
This reverts commit f3faad74d5
, reversing
changes made to 712e7bc7bf
.
Several issues arose after migrating to 5.0, including, but possibly not
limited to, performance regressions in song select, as well as failures
when attempting to save beatmaps after metadata changes in the editor.
2021-03-21 11:05:15 +01:00
Dean Herbert
03592fa696
Merge branch 'master' into realm-migration-operation-blocking
2021-03-19 21:33:26 +09:00
Dean Herbert
1e519f0d31
Fix seemingly innocent logic change causing breakage in score imports
2021-03-15 14:20:59 +09:00
Dean Herbert
fce21f23d6
Add comments marking workarounds required for EFcore 5
2021-03-15 13:29:26 +09:00
Dean Herbert
2904f479c6
Share file lookup workaround in ArchiveModelManager with workaround extensions class
2021-03-15 13:26:14 +09:00
Dean Herbert
79d3379f55
Reformat application of configuration
2021-03-15 13:20:22 +09:00
Dean Herbert
8a35533889
Add fall-through case to catch a potential requery for unsupported model type
2021-03-15 13:11:58 +09:00
Dean Herbert
2bdffd1004
Move skin requery logic into extension methods
2021-03-15 13:11:58 +09:00
Dean Herbert
900da7b891
Rename and refactor extenion methods to be easier to read
2021-03-15 13:11:58 +09:00
Roman Kapustin
28ef64b62a
Explicitly specify SingleQuery behavior
2021-03-14 21:43:27 +03:00
Roman Kapustin
0a1e325fc7
Extract requerying of navigational properties from DbContext
2021-03-14 19:34:53 +03:00
Roman Kapustin
5a4b0174b1
Ignore MultipleCollectionIncludeWarning
2021-03-11 22:40:35 +03:00
Roman Kapustin
47b80d2474
Workaround InvalidOperation exceptions
2021-03-11 20:51:54 +03:00
Roman Kapustin
f1302d1600
Update Microsoft.EntityFrameworkCore
2021-03-11 19:23:56 +03:00
Dean Herbert
b1cd01ceb8
Apply ConfigureAwait changes to game side
2021-03-08 14:36:35 +09:00
Dean Herbert
fa95929121
Remove easy to remove finalizers
2021-03-02 16:07:09 +09:00
Dean Herbert
7e6bd0e995
Fix "failed to import" message showing when importing from a stable install with no beatmaps
2021-02-26 17:30:59 +09:00
Dean Herbert
0196ee882a
Redirect batch imports to a separate task scheduler to avoid contention with interactive actions
2021-02-17 19:41:18 +09:00
Dean Herbert
c1db33e075
Improve some xmldoc on ArchiveModelManager for methods which are not going to trigger user interactive flow
2021-02-17 19:40:56 +09:00
Dean Herbert
a080a9bdbc
Merge pull request #11603 from Game4all/handle-stable-imports-custom-songs-folder
...
Handle beatmap import from a stable installation with a custom Songs directory
2021-02-12 21:42:36 +09:00
Dean Herbert
5f23bd7259
Revert most of the changes to ArchiveModeManager by using better code
2021-02-12 12:48:32 +09:00
Lucas A
383c40b992
Address remaining reviews suggestions.
2021-01-26 20:35:42 +01:00
Lucas A
043385f919
Rename const and fix unintended tabbing.
2021-01-26 18:45:04 +01:00
Lucas A
9f9206726a
Fix typos.
2021-01-26 18:11:54 +01:00
Lucas A
51d4da565c
Fix ArchiveModelManagers lookup paths.
2021-01-24 22:25:49 +01:00
Lucas A
d71ac83428
Use StableStorage in ArchiveModelManager.
2021-01-24 19:46:10 +01: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
Dean Herbert
f1a785f407
Merge branch 'master' into realm-key-binding-store
2021-01-19 18:22:34 +09:00
Salman Ahmed
dc91cebce9
Merge branch 'master' into multiplayer-beatmap-tracker
2021-01-18 19:15:45 +03:00
Bartłomiej Dach
1d7be6a604
Merge branch 'master' into android-multiple-import-support-suppot
2021-01-16 23:13:11 +01:00
Salman Ahmed
96feaa027d
Make ArchiveModelManager
import method overridable (for testing purposes)
2021-01-17 00:01:11 +03:00
Bartłomiej Dach
7296a6dd84
Merge branch 'master' into realm-key-binding-store
2021-01-16 16:48:54 +01:00
Bartłomiej Dach
ddc63662ba
Dispose realm in RealmWriteUsage cleanup
2021-01-16 16:39:04 +01:00
Dean Herbert
86f66727de
Update KeyBinding usages in line with interface changes
2021-01-15 14:57:01 +09: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
df08d964a5
Mark the types which have been migrated in OsuDbContext
2021-01-14 16:31:18 +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
674e78fd93
Fix broken xmldoc
2021-01-13 18:38:30 +09:00
Dean Herbert
9bf9a8c351
Remove Live<> wrapper until it is needed
2021-01-13 18:36:37 +09:00
Dean Herbert
8442b34e84
Tidy up write usage class
2021-01-13 18:36:37 +09:00
Dean Herbert
5fa3a22f28
Remove unused RealmBackedStore base class
2021-01-13 18:36:37 +09:00
Dean Herbert
9d744d629f
Update existing usages to use the main realm context where applicable
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
Dean Herbert
46a1d99c74
Allow detach to be run against an IQueryable directly
2021-01-12 17:01:16 +09:00
Dean Herbert
f0a9688baa
Remove unnecessary mapped type
2021-01-12 15:50:09 +09:00
Dean Herbert
7769d95e7b
Add xmldoc for extension methods
2021-01-12 15:48:26 +09:00
Dean Herbert
ff16d2f490
Mark classes nullable
2021-01-12 15:21:02 +09:00
Dean Herbert
2e4c3c8e39
Avoid closing initial context after migrations (unnecessary)
2021-01-12 14:45:36 +09:00
Dean Herbert
0dca9c8c46
Tidy up RealmContextFactory; remove delete/dispose method which wouldn't work due to threading
2021-01-12 14:45:36 +09:00
Dean Herbert
8cbad1dc1c
Add logging of opened and created contexts
2021-01-12 14:45:36 +09:00
Dean Herbert
ffb42c37df
Move schema version to const
2021-01-12 14:45:36 +09:00
Dean Herbert
0789621b85
Elaborate on comment mentioning migrations
2021-01-12 14:45:36 +09:00
Dean Herbert
fc55d67c66
Add helper method for detaching lists from realm
2021-01-12 14:45:36 +09:00
Dean Herbert
d810af82ec
Expose Live.Detach() method for ease of use
2021-01-12 14:45:36 +09:00
Dean Herbert
dd50b5870e
Move extensions methods into own class
2021-01-12 14:45:36 +09:00
Dean Herbert
6736db327a
Remove scheduler being passed in for now
2021-01-12 14:45:36 +09:00
Dean Herbert
a13b6abcff
Remove incorrect default specification from IRealmFactory interface
2021-01-12 14:45:36 +09:00
Dean Herbert
70689eee2b
Perform initial lookup if original is not managed
2021-01-12 14:45:36 +09:00
Dean Herbert
05ca016deb
Make Live implement IHasGuidPrimaryKey
2021-01-12 14:45:36 +09:00
Dean Herbert
20584c9e16
Add full xmldoc for Live class
2021-01-11 19:28:19 +09:00
Dean Herbert
9f64f6059f
Rename RealmWrapper to Live
2021-01-11 16:31:36 +09:00
Dean Herbert
5bb4d35982
Make RealmWrapper nullable enabled
2021-01-11 16:31:36 +09:00
Dean Herbert
cdb3d20fc6
Remove unnecessary warning suppression
2021-01-11 16:31:36 +09:00
Dean Herbert
6c90f9ceed
Move RealmWrapper to own file
2021-01-11 16:31:36 +09:00
Dean Herbert
86daf65630
Fix primary key not being populated for KeyBinding
2021-01-11 16:31:35 +09:00
Dean Herbert
a77519c6bd
Store KeyBinding action to its own field in realm
...
Also improve the Query method for action types by using generic field
2021-01-11 15:52:49 +09:00
Dean Herbert
382a40b243
Tidy up some missed inspections in RealmContextFactory
2021-01-11 15:52:49 +09:00
Dean Herbert
845d5cdea2
Switch guid to store as string until fody issues are resolved
...
See
https://github.com/realm/realm-dotnet/issues/740#issuecomment-755898968
2021-01-11 15:52:49 +09:00
Dean Herbert
ae76eca564
Add basic realm migration support
2021-01-11 15:52:49 +09:00
Dean Herbert
5d7ab4a7f1
Rename global statistics to be specific to realm
2021-01-11 15:52:49 +09:00
Dean Herbert
9cfede2e7e
Setup context, write usage, wrapper classes
2021-01-11 15:52:49 +09:00
Lucas A
324f80d994
Fix merge conflicts.
2021-01-02 19:14:10 +01:00
Bartłomiej Dach
a376a23ed7
Merge branch 'master' into fix-leaderboard-user-handling
2020-12-28 13:43:53 +01:00
Dean Herbert
545dcac4ec
Add null hinting on UserLookupCache query method
2020-12-28 20:13:24 +09:00
Dean Herbert
5ca9a6a980
Add xmldoc on UserLookupCache's lookup method
2020-12-28 20:05:48 +09:00
Dean Herbert
4d61c143db
Fix lookup cache throwing a null reference if no matches were successful
2020-12-28 15:03:44 +09:00
Lucas A
926281831b
Fix missing XMLDoc bit.
2020-12-19 10:36:27 +01:00
Lucas A
5d7294451f
Refactor Import() overload to take a list of import tasks instead.
2020-12-16 14:28:16 +01:00
Dean Herbert
58d7e41978
Enable nullable on ImportTask
2020-12-08 12:52:34 +09:00
Dean Herbert
77279a7e56
Update stale xmldoc on import method
...
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
2020-12-08 12:48:59 +09:00
Dean Herbert
eb38bc4b4c
Add the ability to import into ArchiveModelManagers from a stream
2020-12-07 18:09:18 +09:00
Dean Herbert
009d666241
Use dictionary to avoid linq overhead
2020-11-17 10:57:11 +09:00
smoogipoo
85b0f71467
Handle duplicate user IDs within the same batch
2020-11-16 21:17:43 +09:00
smoogipoo
87bf168718
Use queue instead of list
2020-11-16 20:52:51 +09:00
smoogipoo
1b1f4c9c09
Refactor user request to fix threadsafety issues
2020-11-16 20:35:22 +09:00
Dean Herbert
4d6f0a8ea7
Fix API request error handling
2020-11-09 19:42:00 +09:00
Dean Herbert
dc69eefa51
Use HashSet instead of ConcurentBag
2020-11-09 11:54:28 +09:00
Dean Herbert
90ce1bd5f0
Add missing async suffix
2020-11-09 10:40:16 +09:00
Dean Herbert
4bbd3fe886
Handle null result
2020-11-06 18:37:27 +09:00
Dean Herbert
c97c6bbf52
Add and consume user cache class
2020-11-06 17:00:29 +09:00
Dean Herbert
d3a303e251
Use CheckExists function
2020-11-06 16:57:09 +09:00
Dean Herbert
b69ada64e8
Update BeatmapDifficultyCache to use base implementation logic
2020-11-06 14:31:21 +09:00
Dean Herbert
a2606d31c7
Move lookup/storage/compute logic to base class (and consume in ScorePerformanceCache)
2020-11-06 13:51:41 +09:00
Dean Herbert
0103b12575
Add basic base class to begin to standardise function across caching components
2020-11-06 13:26:39 +09:00
Bartłomiej Dach
2b0bea535e
Resolve CA1805 inspections
...
"Member is explicitly initialized to its default value"
2020-11-01 18:47:40 +01:00
Berkan Diler
cc11283143
Use string.Starts-/EndsWith char overloads
2020-10-16 11:27:02 +02:00
Dean Herbert
88ffcb9234
Update EndsWith usages
2020-10-16 12:58:34 +09:00
Dean Herbert
50eca202f4
User IEnumerable for HandledExtensions
2020-10-02 16:17:10 +09:00
Dean Herbert
8b255f4579
Fix test failures
...
The issue was the ArchiveModelManager change; the test local change is
just there because it makes more sense to run for every test in that
scene.
2020-09-25 18:40:22 +09:00
Dean Herbert
50ba320a51
Expand available file operations in ArchiveModelManager
2020-09-25 13:16:30 +09:00
Dean Herbert
1884e0167b
Eagerly populate skin metadata to allow usage in hashing computation
2020-09-14 23:31:03 +09:00
Dean Herbert
15b533f2a4
Hash skins based on name, not skin.ini contents
...
It is feasible that a user may be changing the contents of skin.ini
without changing the skin name / author. Such changes should not create
a new skin if already imported.
2020-09-11 16:20:54 +09:00
Dean Herbert
e80ef341d2
Allow UpdateFile to be called when a previous file doesn't exist
2020-09-03 13:20:23 +09:00
smoogipoo
443977aa8d
Remove PreUpdate, update hash in Save()
2020-06-08 14:40:17 +09:00
Dean Herbert
b41384dde8
Merge branch 'master' into multiplayer-beatmap-checksum
2020-06-07 18:05:33 +09:00
Dean Herbert
5ed3cd205f
Simplify reuse check using FileInfo IDs
2020-06-03 23:35:56 +09:00
Dean Herbert
012933545e
Add test coverage
2020-06-03 18:33:41 +09:00
Dean Herbert
c155ab8339
Check filenames and timestamps before reusing an already imported model
2020-06-03 18:03:10 +09:00
smoogipoo
dfb9687fb5
Extract update into PreUpdate(), add test
2020-06-02 17:22:09 +09:00
Dean Herbert
f989f1aa00
Change event flow to avoid firing store delete events on update
2020-05-27 16:08:47 +09:00
Dean Herbert
904d17224f
Fix english
2020-05-24 23:09:49 +09:00
Dean Herbert
234fa28445
Ensure export filename is valid
2020-05-24 22:34:31 +09:00
Dean Herbert
c071fe6140
Add the ability to export skins
2020-05-24 13:44:11 +09:00
Dean Herbert
052ad79fc6
Convert dangerous events to IBindables
2020-05-19 16:44:22 +09:00
Dean Herbert
6c350db097
Add connection flushing support
2020-05-11 21:39:44 +09:00
Dean Herbert
deb87517d0
Add local beatmap lookup cache
2020-05-02 14:35:12 +09:00
Dean Herbert
ad7cda8735
Fix download failures causing a non-safe drawable change
2020-03-10 20:11:06 +09:00
Dean Herbert
120dab18cf
Fix DownloadTrackingComposite incorrectly receiving cancelled state
2020-02-15 16:20:44 +09:00
smoogipoo
0e844b3039
Cleanup / re-protect file store
2020-01-14 19:24:53 +09:00
smoogipoo
1b3bff6fa5
Fix model file infos not being removed
2020-01-14 19:24:53 +09:00
smoogipoo
b91bcaccba
Remove outdated comment
2020-01-14 19:24:53 +09:00
smoogipoo
5f5878e37e
Dereference existing file
2020-01-14 19:24:53 +09:00
smoogipoo
b592b6d80d
Improve robustness by always creating a new file
2020-01-14 19:24:53 +09:00
smoogipoo
609102bea3
Initial file updating implementation
2020-01-14 19:24:53 +09:00
smoogipoo
681a43a318
Refactor to support beatmap updates
2020-01-14 19:24:53 +09:00
Dean Herbert
b3a7b02e3b
Merge remote-tracking branch 'upstream/master' into fix-cancelling-request-not-correct
2020-01-07 11:43:01 +09:00
Dean Herbert
74d875a2e0
Give empty archives a hash based on archive name to avoid duplicate imports
2019-12-26 18:44:50 +09:00
Salman Ahmed
89fa1be2c8
Fix download manager potentially not handling cancel requests
2019-12-25 22:55:14 +03:00
Dean Herbert
886db8eb22
Merge branch 'master' into fix-local-score-availability
2019-12-18 01:15:20 +09:00
smoogipoo
946a202ee5
Fix online replays not being available locally
2019-12-17 15:47:08 +09:00
Huo Yaoyuan
40b43b85f1
CA1715: use prefix for generic parameters.
2019-12-17 13:00:25 +08:00
Dean Herbert
76a7e9cde8
Catch file exception in test reset
2019-12-12 14:04:57 +09:00
Huo Yaoyuan
b86a3dbfab
PathStandardise -> ToStandardisedPath
2019-12-11 16:06:56 +08:00
Huo Yaoyuan
6b3c7c8421
Remove usages of FileSafety class.
2019-12-11 16:05:35 +08:00
Dean Herbert
c49aeb08c4
Add API methods to perform requests out-of-queue
2019-11-29 20:03:14 +09:00
Huo Yaoyuan
f05b83d7d4
Use typeparamref.
2019-11-17 20:48:23 +08:00
Huo Yaoyuan
e9b8cbb516
Apply other styles.
2019-11-11 20:27:04 +08:00
Huo Yaoyuan
ccc8aa6fa4
Apply brace style.
2019-11-11 20:13:13 +08:00
Dean Herbert
0cd912fcd3
Cover all non-APIAccess APIRequest calls with exception handling
2019-10-31 15:04:13 +09:00
Dean Herbert
cf3ed42bfc
Fix download tracking components getting stuck on import failures
2019-10-28 17:41:42 +09:00
Dean Herbert
66b0004448
Remove unused logger provider class
2019-10-28 12:02:58 +09:00
smoogipoo
f8eb07b211
Only lock database for the duration of a model restoration
2019-10-03 11:24:17 +09:00
smoogipoo
dfaa9531f8
Only lock the database for the duration of a deletion
2019-10-02 18:48:50 +09:00
Dean Herbert
cdf29b0952
Specify model name on initialize and fail import notification m… ( #6192 )
...
Specify model name on initialize and fail import notification messages
2019-09-22 15:54:04 +09:00
iiSaLMaN
9be8bdef52
Remove pluralize and use title letter casing
2019-09-21 21:00:24 +03:00
iiSaLMaN
6bb0f3eb41
Move humanizing to the model name instead
2019-09-21 20:04:12 +03:00
iiSaLMaN
3be03a26c9
Pluralize instead of adding 's'
2019-09-20 16:18:55 +03:00
iiSaLMaN
8300e86f20
Specify model name on import notification messages
2019-09-20 15:46:43 +03:00
smoogipoo
dfc0928ebe
Fix scores importing with deleted beatmap sets
2019-09-20 19:39:21 +09:00
Dean Herbert
ddff9882cf
Fix importing archives which are nested in a single folder within a zip
2019-09-19 19:11:04 +09:00
smoogipoo
3ebfa0505c
Don't share single scheduler across all model managers
2019-08-08 18:26:07 +09:00
Dean Herbert
cb17007fa7
Fix zero-length hash models incorrectly creating a unique hash
2019-07-29 16:57:19 +09:00
Dean Herbert
71e40b4684
Force SQLite to multithreading mode
2019-07-06 12:32:16 +09:00
Dean Herbert
598b0d668b
Merge branch 'master' into import-stable-scores
2019-07-05 15:54:33 +09:00
Dean Herbert
df7d31350c
Stop import failures from being added to the imported model list
2019-07-05 14:47:55 +09:00
Dean Herbert
80d8ce8392
Fix GetStableImportPaths xmldoc
2019-07-05 14:21:56 +09:00
Dean Herbert
ba8df3ba92
Clean up stable lookup and mutate logic
2019-07-05 13:59:31 +09:00
Dean Herbert
8346c50ce1
Rename delete method and improve xmldoc
2019-07-05 13:55:25 +09:00
Dean Herbert
7575047db8
Merge branch 'master' into import-stable-scores
2019-07-04 01:00:42 +09:00
Dean Herbert
8e54990f62
Add database statistics to GlobalStatistics
2019-07-02 13:43:43 +09:00
HoLLy
12350d18b5
Don't remove imported archives by default
2019-06-27 14:41:11 +02:00
HoLLy
55216dffb7
Merge remote-tracking branch 'origin/master' into import-stable-scores
2019-06-27 14:07:17 +02:00
naoey
61260cf599
Hand off comparison logic for database query to implementors
...
Equals overrides are not used in EF queries without running the comaprison locally instead of on the database, so to preserve that the comparison logic is instead implemented on a per manager basis.
2019-06-27 15:32:27 +05:30
Dean Herbert
72bb6f8c12
Fix download buttons not correctly finding existing downloads
2019-06-27 15:24:08 +05:30
Dean Herbert
da65658bc3
Fix comments
2019-06-26 20:07:01 +09:00
Dean Herbert
9e1cb90dd8
Remove existing argument for ItemAdded event
...
For all usages, it looks like this was unnecessary.
2019-06-26 11:40:41 +09:00
naoey
c476e46a8e
Remove unnecessary private methods and inline used-once code
2019-06-25 21:16:30 +05:30
naoey
6f5fbd7ea1
Remove unnecessary try-catch block
2019-06-25 18:28:59 +05:30
HoLLy
802da225d4
Move responsibility for selecting paths to model managers
2019-06-21 17:32:47 +02:00
HoLLy
f1f03dd541
Remove async from Import method
2019-06-21 17:01:11 +02:00
HoLLy
99f1a94797
Fix notification progress bar
2019-06-19 20:50:50 +02:00
HoLLy
0cb66d522a
Check if path can be imported before trying
2019-06-19 20:36:00 +02:00
HoLLy
ef2e93d5c7
Improve handling of null models when importing
2019-06-19 19:29:47 +02:00
HoLLy
15c75b4442
Add basic score import from stable
2019-06-19 18:33:51 +02:00
naoey
4b46601eae
Remove redundant variable, handle all request failures
2019-06-19 19:43:09 +05:30
Dean Herbert
1bcff8a3e2
Make generic covariant
2019-06-19 01:57:38 +09:00
Dean Herbert
341dc74834
Simplify download method
2019-06-19 01:41:19 +09:00
Dean Herbert
f2e0ced052
Move private event handling logic to bottom of class
2019-06-19 01:32:37 +09:00
naoey
4a16ac53ba
Remove extra newline
2019-06-15 12:28:23 +05:30
naoey
3c2a2b2390
Move doc to interface
2019-06-13 21:28:32 +05:30
naoey
7ba676ad31
Rename Info to Model
2019-06-12 21:56:36 +05:30
naoey
9cd5519da3
Remove unused delegate, use model name in notifications, add more xmldoc
...
- Applies a `class` constraint to the generic type in `IModelManager`
- Add xmldoc
2019-06-12 19:26:06 +05:30
naoey
c5f1da0f71
Merge remote-tracking branch 'upstream/master' into generic-download-model-manager
2019-06-12 18:20:35 +05:30
naoey
951a5abccc
Merge remote-tracking branch 'upstream/master' into generic-download-model-manager
2019-06-12 17:41:16 +05:30
smoogipoo
a17d480f51
Use "beatmap" as the model name
2019-06-12 20:41:02 +09:00
Dean Herbert
412c9646ec
Merge branch 'master' into improve-deletion-notification
2019-06-12 17:47:00 +09:00
smoogipoo
d4deac48ee
Improve model deletion notification text
2019-06-12 17:27:15 +09:00
smoogipoo
2a67944889
Remove interlocked within a lock
2019-06-12 17:10:55 +09:00
smoogipoo
fd7dc9504e
Remove async when not required
2019-06-12 17:08:50 +09:00
Dean Herbert
c591a6f1fa
Rename request type to be less verbose
2019-06-12 13:30:23 +09:00
Dean Herbert
eaeeffaa86
Rename to DownloadableArchiveModelManager
2019-06-12 13:28:44 +09:00
naoey
c69d3e2d38
Fix doc move derp
2019-06-12 00:02:53 +05:30
naoey
c320b6110c
Rename interface
...
- Fix wrong inheritance in ArchiveModelManager
- Add license headers
2019-06-11 23:53:37 +05:30
naoey
4a6074865e
Create interfaces for DownloadTrackingComposite to consume
2019-06-11 22:42:57 +05:30
naoey
d903ad2186
Fix order
2019-06-11 21:30:25 +05:30