cdwcgt
e8092bff46
logic fix?
2023-02-26 15:28:24 +09:00
cdwcgt
fdf9544688
cancel handle
2023-02-26 15:28:10 +09:00
cdwcgt
a20e2685be
make static name fix
2023-02-25 20:11:08 +09:00
cdwcgt
78201c4649
log to database
2023-02-23 22:17:35 +09:00
cdwcgt
60bdae41b6
make static
2023-02-23 22:17:13 +09:00
cdwcgt
9e1eb50d9b
use log
2023-02-23 20:21:04 +09:00
cdwcgt
ba345e5591
delete notify post when duplicate export
2023-02-23 20:10:50 +09:00
Cootz
90aa4288d0
Reduce the allowed length by 5 to account for (99) suffix. Move truncating logic to GetFilename
. Update tests.
2023-02-21 18:35:53 +03:00
cdwcgt
d20e1df603
wrong xmldoc
...
because of 6900d0120a
2023-02-21 20:54:06 +09:00
cdwcgt
04dcd661e0
async logic fix
2023-02-21 20:53:02 +09:00
cdwcgt
0667b83960
Path.GetExtension() will not get null
2023-02-19 02:56:53 +09:00
cdwcgt
229b31520f
remove ()
2023-02-19 02:42:33 +09:00
cdwcgt
fba99b344c
Accidentally deleted using
...
wtf
2023-02-19 02:41:08 +09:00
cdwcgt
79715fe37b
catch when zipWriter dispose
...
ObjectDisposedException also appear when zipwriter dispose after user request cancel
2023-02-19 02:24:07 +09:00
cdwcgt
8446e7d841
comment
2023-02-19 02:17:24 +09:00
cdwcgt
2a6ea99e6a
store exportingModels for all exporter
...
No one wants to export multiple copies of the same model at the same time, right?
2023-02-19 02:09:59 +09:00
cdwcgt
30985f192e
catch ObjectDisposedException
2023-02-19 02:06:07 +09:00
cdwcgt
d611603742
catch OperationCanceledException
2023-02-19 01:45:09 +09:00
cdwcgt
309e9b24e2
split LegacyArchiveExporter
2023-02-19 01:18:27 +09:00
cdwcgt
843d841f5a
GetFilename and something other
...
https://github.com/ppy/osu/pull/21739
2023-02-17 22:23:50 +09:00
cdwcgt
29d6483e17
ConfigureAwait for awaited task
2023-02-17 22:19:24 +09:00
cdwcgt
e84e011d5d
Merge branch 'master' into export
2023-02-17 22:15:19 +09:00
cdwcgt
eac0aa79a3
cancellationToken pass, notification adujust
2023-02-17 22:09:09 +09:00
Cootz
e3bdb3d852
Align links in one line
2023-02-17 15:32:36 +03:00
Cootz
fd1beaef87
Fix typo
2023-02-17 15:24:27 +03:00
Cootz
a3b440493a
Update xml doc
2023-02-17 15:23:43 +03:00
Cootz
ceed3606cd
Remove redundant comment
...
Co-authored-by: Dean Herbert <pe@ppy.sh>
2023-02-17 13:46:06 +03:00
Dean Herbert
8c772a723f
Expose constant public
ly rather than reexposing business
2023-02-17 13:34:19 +09:00
Dean Herbert
96b1498932
Rename max length variable to make sense (it's a filename limit, not path)
2023-02-17 13:33:22 +09:00
Cootz
f1da213bea
Add tests
2023-02-16 16:26:57 +03:00
Cootz
387a6f1330
Move logic to Export
method
2023-02-15 22:43:43 +03:00
Cootz
fb06a77e2b
Merge branch 'master' into fix-exporting-a-skin-with-too-long-file-name
2023-02-15 22:29:38 +03:00
Cootz
1f586c129c
fix applied
2023-02-15 22:15:44 +03:00
Dean Herbert
e71dfd7555
Fix skin export failing if a directory exists with the proposed filename
2023-02-15 16:11:16 +09:00
Dean Herbert
c50ea89bc9
Simplify migration to not rely on old/dynamic schema
2023-02-08 14:24:06 +09:00
Cootz
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
Cootz
a1ee3df453
Improve local variable naming
2023-02-07 03:16:25 +03:00
Cootz
d23e787bc1
Update schema_version
2023-02-05 21:55:50 +03:00
Cootz
4598112586
Add OriginalBeatmapHash to ScoreInfo. Update db schema_version, migration
2023-02-05 21:46:38 +03:00
Susko3
f8537c1cbe
Delegate file deletion to ImportTask
to allow overriding it
2023-01-22 22:19:04 +01:00
Dean Herbert
cde45cdd3e
Merge pull request #21739 from integerrr/score-export-date
...
Append date to score export filename
2023-01-10 23:33:38 +09:00
Dean Herbert
a22b7298c6
Adjust english slightly
2023-01-10 22:27:36 +09:00
Salman Ahmed
0d6b9ebc0f
Display number of failing models during batch-import
2023-01-10 13:32:10 +03:00
integer
f971405c8c
append time as well
2023-01-10 00:02:31 +00:00
Salman Ahmed
5ee0665eac
Merge branch 'master' into pause-imports-during-gameplay
2023-01-09 20:09:17 +03:00
Salman Ahmed
8a05223591
Check cancellation token if importer was resumed while sleeping
2023-01-09 20:07:46 +03:00
Salman Ahmed
a1fbfe4b8b
Specifiy importer name during pause/resume in logs
2023-01-09 19:53:41 +03:00
Dean Herbert
811a562608
Don't use bindables to avoid potential cross-usage contamination
2023-01-10 01:10:20 +09:00
Dean Herbert
62ffb4fe78
Pause imports during active gameplay
2023-01-09 18:54:11 +09:00
Endrik Tombak
15eebd1f50
Only show message about Songs folder
2023-01-09 11:47:13 +02:00
Bartłomiej Dach
04d4b4a6ce
Rename and xmldoc hard link creation method
2022-12-28 22:04:05 +01:00
Bartłomiej Dach
2c346eae0d
Revert inlining of hard link creation into condition
...
Just feels bad. Mixing data access with actual underlying logic.
2022-12-28 21:19:28 +01:00
BlauFx
c6da7248ba
Remove unnecessary directive
2022-12-28 14:40:32 +01:00
BlauFx
53bca947d1
Move duplicated code into its own method
2022-12-28 14:34:27 +01:00
BlauFx
b2aa2e1602
Add hardlink support for Linux
2022-12-28 13:32:49 +01:00
integer
272288c9aa
fix code style and naming
2022-12-25 21:50:56 +00:00
integer
d392d1a5c0
override a sub-method instead of the whole Export()
2022-12-24 22:18:42 +00:00
integer
498d00935b
limit date appending to LegacyScoreExporter
only
2022-12-23 23:01:04 +00:00
Dean Herbert
ba54551313
Merge branch 'master' into guard-url-protocols
2022-12-16 18:23:16 +09:00
Dean Herbert
27c497145f
Fix the MOTHERLOAD of undetected issues that are now visible thanks to net6.0
2022-12-16 18:16:26 +09:00
cdwcgt
5912dfd443
using declaration
...
reshaper
2022-12-15 23:42:49 +09:00
cdwcgt
cd8420bc66
Handle the case where the file cannot be found
2022-12-15 23:34:40 +09:00
cdwcgt
dadadaff65
remove try catch
2022-12-15 23:20:29 +09:00
cdwcgt
f5226bd50b
use ZipWriter
...
Export directly to stream instead of creating a archive
so we can cancel this anytime
2022-12-15 23:12:25 +09:00
cdwcgt
ec251664a7
use ThrowIfCancellationRequested instead of CancelRequested
2022-12-15 22:45:36 +09:00
cdwcgt
6900d0120a
change abstract implement
2022-12-15 21:39:48 +09:00
Dean Herbert
6bf1477939
Fix some hard links not being created due to missing directory structure
...
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
2022-12-15 14:17:28 +09:00
Dean Herbert
b8904fe747
Move ImportParameters
to better home
2022-12-13 21:41:26 +09:00
Dean Herbert
cb16d62700
Hook up ImportParameter
flow with IModelImporter
caller methods
2022-12-13 21:29:32 +09:00
Dean Herbert
6bb612ce69
Move hard link availability check to helper class
2022-12-13 20:20:42 +09:00
Dean Herbert
bbf931c746
Move hard link helper functions to their own class
2022-12-13 19:55:18 +09:00
Dean Herbert
1d4230993d
Hook up parameter with RealmFileStore
to complete the chain
2022-12-13 19:55:18 +09:00
Dean Herbert
cf2719d4c0
Convert batchImport
parameter to parameters class to allow further import configuration
2022-12-13 19:55:18 +09:00
Dean Herbert
d8de99bbe4
Check for hard link support in first run overlay
2022-12-12 13:44:09 +09:00
Dean Herbert
3b1920c060
Add code to check whether a file is a hard link
2022-12-12 13:44:09 +09:00
Dean Herbert
f27603dd6d
Use hard links instead of file copy when available
2022-12-12 13:44:09 +09:00
cdwcgt
e02b8cb199
Group export methods into their respective managers
2022-12-11 18:30:24 +09:00
cdwcgt
a87bcccc42
xmldoc
2022-12-11 17:00:53 +09:00
cdwcgt
2d57633409
rename method name and add xmldoc
2022-12-11 17:00:52 +09:00
cdwcgt
fa30f3348f
onComplete
should private
2022-12-11 17:00:51 +09:00
cdwcgt
951302fe61
ExportAsync use TModel
2022-12-10 00:43:03 +09:00
cdwcgt
405985ec5b
remove Component
...
exportStorage to private
notification should post when export instead of class being constructed
2022-12-09 23:57:03 +09:00
cdwcgt
19afce6776
Fix overwriting existing files
...
https://github.com/ppy/osu/pull/21468
2022-12-09 23:41:07 +09:00
cdwcgt
a1fc33668c
Merge branch 'master' into export
2022-12-09 23:40:26 +09:00
Dean Herbert
819fd5f950
Fix incorrect resolution of GameHost
in LegacyImportManager
2022-12-07 17:53:14 +09:00
Piggey
75cf7bd1d2
change GetNextBestFilename()
's parameters
2022-12-01 18:44:02 +01:00
Piggey
8f59aad91c
unnecessary includes
2022-11-30 18:37:50 +01:00
Piggey
8b856f1c89
make LegacyExporter
use NamingUtils.GetNextBestFilename()
2022-11-30 18:32:53 +01:00
Piggey
b99ddc2acf
use .Select()
to trim the file extension from filename
2022-11-30 15:36:08 +01:00
Piggey
660ad913ec
oh wait this affects all of the legacy exporters
2022-11-30 11:06:44 +01:00
Dawid Sośnia
f0b8b53e81
Merge branch 'ppy:master' into fix-exported-replay-overwrite
2022-11-30 10:54:12 +01:00
Piggey
5e74c4e3b7
override LegacyScoreExporter.Export()
to not overwrite files
2022-11-30 10:52:41 +01:00
Piggey
f5d85f5774
make ExportStorage
protected
2022-11-30 10:51:42 +01:00
cdwcgt
6adac853e8
Spite sync method ExportToStream
...
`uuid` to `model`
2022-11-27 09:58:54 +09:00
Dan Balasescu
7bc8908ca9
Partial everything
2022-11-27 00:00:27 +09:00
cdwcgt
162f0bb95e
filename can be private
2022-11-21 19:06:04 +09:00
cdwcgt
564f136945
add xmldoc
2022-11-21 19:04:05 +09:00
cdwcgt
9c6421a462
log the error
2022-11-21 19:00:10 +09:00
cdwcgt
e37d30a373
refactor based on reviews
...
removed LegacyExportManager
Separated the method of CreateZip method and the default export method
2022-11-21 18:58:01 +09:00
cdwcgt
ed53168267
typo fix
2022-11-21 17:42:11 +09:00
cdwcgt
60ef88844c
Recover accidentally deleted codes
2022-11-21 17:09:56 +09:00
cdwcgt
2653bd2f99
Make notification cannot cancel when Saving Zip Archive
...
This operation cannot be stopped(if not dispose stream).
so make it cannot cancel
2022-11-19 12:57:56 +09:00
cdwcgt
28867fbbb1
Add comment
2022-11-19 12:34:35 +09:00
cdwcgt
fc4a6cb125
working with test
2022-11-19 01:02:35 +09:00
cdwcgt
4b29941b47
add LegacyExportManager
2022-11-18 20:00:00 +09:00
Dan Balasescu
5ceb7ecc41
Remove unused using
2022-11-17 13:56:27 +09:00
Dean Herbert
1050d7da34
Use more generic exception type (issue reported AggegateException
)
2022-11-17 13:36:16 +09:00
Dean Herbert
adab9f0e48
Catch and gracefully handle file/directory enumeration failures during stable import
...
Closes https://github.com/ppy/osu/issues/21214 .
2022-11-17 13:34:42 +09:00
cdwcgt
e1a21e0cf9
create a task to export to avoid block main thread
...
Code quality and remove some #nullable disable
2022-11-17 01:08:06 +09:00
Bartłomiej Dach
f775741d65
Merge branch 'master' into fix-filename-char-filtering
2022-10-29 12:42:10 +02:00
Dean Herbert
66ed77ac91
Rename and add documentation to function
2022-10-28 18:04:28 +09:00
Dean Herbert
42eafe318c
Remove various simple obsoletions
2022-10-28 13:20:58 +09:00
Dan Balasescu
3ac3c33cc3
Merge pull request #20712 from peppy/reduce-import-transaction-scope
...
Reduce the scope of realm transactions during import operations
2022-10-12 16:56:21 +09:00
Dean Herbert
390ff8b9da
Reduce the scope of realm transactions during import operations
2022-10-11 21:58:28 +09:00
Dean Herbert
a44ba579c5
Fix beatmap update button not respecting user "prefer no video" setting
...
Closes #20701 .
2022-10-11 14:27:40 +09:00
Dean Herbert
64ee210825
Add realm migration to update skin names
2022-09-18 00:12:43 +09:00
Dan Balasescu
e95983cdb4
Merge branch 'master' into fix-skin-flow
2022-09-16 20:15:51 +09:00
Dean Herbert
581a4d2d6d
Use APIBeatmap
for realm migration requiring ShortName
mapping
2022-09-15 16:58:58 +09:00
Dean Herbert
40a60f7145
Remove all entity framework code and migrations
2022-09-15 16:58:58 +09:00
Dean Herbert
9226f0abbc
Implement equality correctly in Live
2022-09-13 19:16:25 +09:00
Dean Herbert
0fcd9e02f6
Fix skin dropdown not updating correctly when skin is changed externally
2022-09-13 14:01:40 +09:00
Dean Herbert
d561fcb126
Don't trigger fling animation when Close
is triggered by non-user action
2022-09-12 16:54:25 +09:00
Dan Balasescu
8cbd344330
Improve performance when cancelling import with debugger attached
2022-09-05 11:28:13 +09:00
Dean Herbert
09aa3e065d
Move colouring to full icon content rather than background
2022-08-30 18:06:48 +09:00
Dean Herbert
b8fda1a16f
Apply NRT to notification classes
...
and tidy things up a bit.
2022-08-30 15:57:10 +09:00
its5Q
0cc6a76c17
Fix crash with legacy import from incomplete installs
2022-08-28 14:13:38 +10:00
Dan Balasescu
d947a6cb59
Add Realm migration
2022-08-24 17:28:41 +09:00
Dean Herbert
e1e6be039a
Don't create destination stream if backup source doesn't exist
2022-08-17 18:20:47 +09:00
Dean Herbert
fca076b988
Fix edge case of realm backup cascading failure
2022-08-17 17:17:22 +09:00
Dan Balasescu
e689d4be96
Merge pull request #19530 from peppy/store-modified-time
...
Add `BeatmapInfo.LastUpdate` to track the time of local changes
2022-08-16 20:20:41 +09:00
Dean Herbert
1a7ddc0040
Fix re-importing existing collections not correctly adding new items
2022-08-16 16:43:05 +09:00
Dean Herbert
11f38e539f
Rename property to LastLocalUpdate
2022-08-16 16:01:19 +09:00
Dean Herbert
c7db4a532c
Merge branch 'master' into store-modified-time
2022-08-16 15:53:51 +09:00
Dan Balasescu
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
Dan Balasescu
f9c6dc314b
Merge pull request #19678 from peppy/fix-file-comparisons-many-places
...
Fix audio track not correctly advancing when changing between certain beatmaps
2022-08-10 20:38:14 +09:00
Dan Balasescu
69cbf4185b
Match class name to file
2022-08-10 19:53:40 +09:00
Dean Herbert
ac99c1ad69
Migrate the majority of existing file lookups to use new extension methods
2022-08-10 16:01:16 +09:00
Dean Herbert
ddffa9b1bd
Fix crash when attempting to import on mobile platforms
...
Regressed with NRT application to this file. It's probably the first
time we've actually hit this due to an optional DI that is actually not
available outside of tests.
2022-08-10 15:32:43 +09:00
Dean Herbert
6459dbd9e5
Fix collection import not showing progress notification
2022-08-08 14:56:16 +09:00
Dean Herbert
c31e257a1f
Clean up pending deletion presets on startup
2022-08-07 15:16:33 +09:00
Dean Herbert
4544df5978
Leave client.realm
around to handle pull requests without this change merged
2022-08-05 18:27:29 +09:00
Dean Herbert
ad3d00b1dc
Don't add version suffixes when running unit tests
2022-08-05 18:23:41 +09:00
Dean Herbert
3c84b1a389
Change order of application to use original client.realm
last
2022-08-05 17:48:51 +09:00
Dean Herbert
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
Dean Herbert
d3954fc583
Use existing localised error message
2022-08-03 20:15:46 +09:00
Salman Ahmed
7354f9e6ba
Remove localisation for now
2022-08-01 22:05:52 +03:00
Dean Herbert
d7a06abcab
Add BeatmapInfo.LastUpdate
to track the time of local changes
2022-08-02 00:53:07 +09:00
Salman Ahmed
3ff0327d91
Display readable message when reaching download limit
2022-08-01 14:22:54 +03:00
Bartłomiej Dach
345f103119
Migrate mod preset column to use realm
2022-07-31 23:53:45 +02:00
Dean Herbert
6ad86ce5b7
Run collection import process asynchronously
...
Actually required to avoid deadlocking..
2022-07-31 01:06:57 +09:00
Dean Herbert
80ffa2cf20
Move collection database rather than deleting post-migration for safety
2022-07-31 00:54:00 +09:00
Dean Herbert
8e06d55960
Fix collection migration incorrectly running asynchronously
2022-07-31 00:53:39 +09:00
Dean Herbert
cb52b696ed
Merge branch 'master' into bypass-local-metadata-cache
2022-07-29 16:05:54 +09:00
Dean Herbert
c35da62224
Add flow for bypassing local cache lookups when refreshing beatmap metadata
2022-07-28 16:33:51 +09:00
Dean Herbert
2209afd0e8
Mark Live
methods as InstantHandleAttribute
2022-07-28 15:03:08 +09:00
Dean Herbert
1669208a54
Add migration of existing collections database
2022-07-28 13:57:21 +09:00
Dean Herbert
41393616d8
Replace BeatmapCollection
with RealmBeatmapCollection
2022-07-27 19:35:09 +09:00
Dean Herbert
9c543fef48
Remove CollectionManager
2022-07-27 18:45:33 +09:00
Dean Herbert
6b73f7c7ec
Split out legacy import path from realm manager
2022-07-27 15:04:09 +09:00
Dean Herbert
9173271900
Fix new update pathway not actually being used
2022-07-26 17:58:09 +09:00
Dean Herbert
8370ca9765
Add ImportAsUpdate
method to IModelImporter
to avoid otehr changes
2022-07-26 15:49:04 +09:00
Dean Herbert
8a0c8f5fd8
Fix some realm pieces not being cleaned up
2022-07-25 19:51:19 +09:00
Dean Herbert
2e14d8730c
Move implementation of updating a beatmap to BeatmapImporter
2022-07-25 19:51:19 +09:00
Dean Herbert
b7f6413bce
Fix old version of beatmap potentially not being deleted during update flow
...
This can happen if the online IDs are not present in the `.osu` files.
Previously this was only working due to the early logic in the import
process (that relies on matching all online IDs perfectly).
2022-07-25 19:51:19 +09:00
Dean Herbert
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
Dean Herbert
d5e0dba9da
Change default value of StarRating
to -1
2022-07-21 18:20:46 +09:00
Dean Herbert
68f28ff660
Add last applied version to RulesetInfo
2022-07-21 18:15:25 +09:00
Dan Balasescu
2b399ec7ad
Merge branch 'master' into date-submitted-ranked
2022-07-20 18:36:57 +09:00
Dean Herbert
6357223341
Fix incorrect DI fetch and apply nullability to ModelDownloader
2022-07-19 20:06:34 +09:00
Dean Herbert
30daa0fd44
Add ranked and submitted date storage and filtering
2022-07-19 19:55:56 +09:00
Dean Herbert
17046b0553
Add basic handling of download failures
2022-07-19 19:01:23 +09:00
Dean Herbert
6ea380d649
Add new properties to BeatmapInfo
to track online hash and updates
2022-07-19 17:57:01 +09:00
Dean Herbert
51f91fe62e
Update naming
2022-07-18 16:17:20 +09:00
Salman Ahmed
4e7156cee8
Store user country on databased scores
2022-07-16 06:39:05 +03:00
Dean Herbert
c8c79d2185
Standardise HasReplay
implementation (and remove from persisting to realm)
2022-07-15 16:14:21 +09:00
Dean Herbert
8820ea4006
Add last played date to BeatmapInfo
2022-07-13 16:36:43 +09:00
Dean Herbert
8b6665cb5b
Ensure initial beatmap processing is done inside the import transaction
2022-07-11 02:51:54 +09:00
Dan Balasescu
0bc332e90b
Merge pull request #19029 from peppy/fix-skin-import-duplicate
...
Fix skins potentially being duplicated on batch import
2022-07-08 14:18:14 +09:00
Dean Herbert
c53dd4a703
Fix editor saving not updating BeatmapSetInfo
's hash
2022-07-08 02:33:14 +09:00
Dean Herbert
cf1da1dd18
Fix skins potentially being duplicated on batch import
...
Resolves https://github.com/ppy/osu/discussions/19024#discussioncomment-3099200
2022-07-07 22:39:07 +09:00
Dean Herbert
ac216d94a8
Fix transaction not being disposed
2022-07-07 18:15:38 +09:00
Dean Herbert
5197d0fa9e
Add automatic transaction handling to realm helper methods
2022-07-07 17:36:25 +09:00
Dean Herbert
a1b6ec60c8
Add statistics display for MemoryCachingComponent
s
...
Never sure if these are working as they should (or how well they are
working). This helps quite a bit.
2022-07-06 18:38:40 +09:00
Dean Herbert
33db508301
Add note regarding why the realmRetrievalLock
return is done on the async thread
2022-07-05 16:23:10 +09:00
Dean Herbert
5adec2c738
Ensure blocking restoration only completes after update callback work is completed
2022-07-05 14:39:14 +09:00
Dean Herbert
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
Dean Herbert
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
Salman Ahmed
e28ee8bc7a
Count time spent upwards to display attempts correctly
2022-07-02 10:46:52 +03:00
Dean Herbert
93809a92d4
Fix clashing error messaging during realm block operations
2022-07-02 16:30:04 +09:00
Dean Herbert
4fd47b5fa0
Add more verbose logging to realm blocking process
2022-07-02 12:36:56 +09:00
Dan Balasescu
3b1842a2c2
Merge pull request #18835 from peppy/beatmap-update-flow
...
Split out beatmap update tasks to `BeatmapUpdater` and invoke from editor save flow
2022-07-01 20:28:04 +09:00
Dean Herbert
447b496eff
Merge branch 'master' into realm-fix-async-write-after-disposal
2022-06-30 19:07:15 +09:00
Dean Herbert
2a73210865
Add xmldoc and update parameter naming for MemoryCachingComponent.Invalidate
flow
2022-06-30 17:17:06 +09:00
Dean Herbert
98938821e5
Merge branch 'master' into beatmap-update-flow
2022-06-30 16:44:17 +09:00
Dean Herbert
78d86fd3ff
Fix PerformWrite
not rolling back transaction on exception
2022-06-30 15:15:09 +09:00
Dean Herbert
7cb4e32c17
Add one more lock to appease CI
2022-06-29 22:45:19 +09:00
Dean Herbert
a3b4a515fc
Merge branch 'master' into realm-fix-async-write-after-disposal
2022-06-29 22:39:05 +09:00
Dean Herbert
32af4e41ea
Add back thread safety and locking as required
2022-06-29 20:56:01 +09:00
Dean Herbert
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
Dean Herbert
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
Dan Balasescu
396e7fc166
Merge pull request #18862 from peppy/empty-beatmap-file-fix-2
...
Fix second case of empty beatmaps being reported to sentry as errors
2022-06-27 20:37:57 +09:00
Dean Herbert
f355c3a3c9
Merge pull request #18864 from peppy/fix-realm-audio-track-test-fail
...
Centralise and harden editor-ready-for-use check
2022-06-27 19:42:49 +09:00
Dean Herbert
83982d258d
Throw immediately if attempting to WriteAsync
after disposed
2022-06-27 19:34:28 +09:00
Dean Herbert
c39c99bd43
Ensure all async writes are completed before realm is disposed
2022-06-27 19:21:05 +09:00
Dean Herbert
f6a61472c4
Fix occasional failure in realm test proceedings due to incorrect Debug.Assert
...
After a `BlockAllOperations`, the restoration of the `updateRealm`
instance is not instance. It is posted to a `SynchronizationContext`.
The assertion which has been removed in this commit was assuming it
would always be an immediate operation.
To ensure this works as expected, I've tracked the initialised state via
a new `bool`.
```csharp
System.TimeoutException : Attempting to block for migration took too long.
1) Host threw exception System.AggregateException: One or more errors occurred. (: )
---> NUnit.Framework.AssertionException: :
at osu.Framework.Logging.ThrowingTraceListener.Fail(String message1, String message2)
at System.Diagnostics.TraceInternal.Fail(String message, String detailMessage)
at System.Diagnostics.TraceInternal.TraceProvider.Fail(String message, String detailMessage)
at System.Diagnostics.Debug.Fail(String message, String detailMessage)
at osu.Game.Database.RealmAccess.BlockAllOperations() in /opt/buildagent/work/ecd860037212ac52/osu.Game/Database/RealmAccess.cs:line 813
at osu.Game.OsuGameBase.<>c__DisplayClass108_1.<Migrate>b__0() in /opt/buildagent/work/ecd860037212ac52/osu.Game/OsuGameBase.cs:line 449
at osu.Framework.Threading.ScheduledDelegate.RunTaskInternal()
at osu.Framework.Threading.Scheduler.Update()
at osu.Framework.Graphics.Drawable.UpdateSubTree()
at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
```
https://teamcity.ppy.sh/buildConfiguration/Osu_Build/322?hideProblemsFromDependencies=false&hideTestsFromDependencies=false&expandBuildTestsSection=true
2022-06-27 18:01:12 +09:00
Dean Herbert
01487a1185
Add assertion on realm re-fetch being not-null
2022-06-27 15:52:45 +09:00
Dean Herbert
da61d0547f
Include archive name in import log output
2022-06-27 15:24:25 +09:00
Dean Herbert
31a447fda0
Update parameter discards
2022-06-24 21:26:19 +09:00
Dean Herbert
30b3973c9f
Difficulty cache invalidation flow
2022-06-24 21:02:38 +09:00
Bartłomiej Dach
26c5b59f6d
Replace usages of string.To{Lower,Upper}()
2022-06-24 11:57:45 +02:00
Dean Herbert
51268d0cc8
Throw on Wait
failure in a few remaining cases
2022-06-23 15:28:21 +09:00
Dean Herbert
7ef8b7df5f
Add timeout for all ManualResetEventSlim.Wait
invocations
...
Timeout values were taken as best-guesses of upper values we'd expect
from sane execution.
2022-06-23 14:46:00 +09:00
Dean Herbert
948c28f415
Fix collection modified during BlockAllOperations
if any subscriptions have been established
2022-06-22 20:34:05 +09:00
Dan Balasescu
816fd338cb
Fix typo
2022-06-21 19:57:27 +09:00
Dean Herbert
f74b4ac277
Fix blocking overhead when calling WriteAsync
2022-06-21 17:15:25 +09:00
Dean Herbert
ba394f2831
Remove IPostsImports
interface (and move to IModelImporter
)
2022-06-20 18:53:48 +09:00
Dean Herbert
e732c5a2d7
Add PostImport
method matching PreImport
2022-06-20 18:40:23 +09:00
Dean Herbert
45c5013f09
Remove default value of RealmArchiveModelImporter.HandledExtensions
...
Not used anywhere and probably not wanted ever.
2022-06-20 18:40:23 +09:00
Dean Herbert
dbae4c6f5a
PostImport
-> PresentImport
2022-06-20 18:36:29 +09:00
Dean Herbert
4aa32038c3
Add note about stream provided to ImportTask
being disposed implicitly
2022-06-20 15:38:44 +09:00
Dean Herbert
882e1c69e5
Move nested task back outside try-catch to avoid double-error
2022-06-20 15:36:44 +09:00
Dean Herbert
678b18dde6
Ensure any non-MemoryStream
streams are closed as part of ImportTask
2022-06-20 15:29:56 +09:00
Dean Herbert
dd93c7359e
Update xmldoc for importFromArchive
method
2022-06-20 15:25:43 +09:00
Dean Herbert
92f1a2958c
Rename Import(TModel)
to ImportModel
to differentiate from other import methods
2022-06-20 15:18:07 +09:00
Dean Herbert
a6c8a832aa
Remove Import(ArchiveReader)
and redirect existing usages to Import(ImportTask)
2022-06-20 15:14:57 +09:00
Dan Balasescu
f8830c6850
Automated #nullable processing
2022-06-17 16:37:17 +09:00
Bartłomiej Dach
651862fee0
Merge branch 'master' into database-migration-reliability
2022-06-16 17:19:58 +02:00
Dean Herbert
bf6c6682bc
Move null to finally
2022-06-16 23:37:24 +09:00
Dean Herbert
7809566f16
Add explanatory comments
2022-06-16 23:31:49 +09:00
Dean Herbert
7b0fad6461
Null disposal token after use
2022-06-16 23:29:33 +09:00
Dean Herbert
448eee051a
Update filename to match new class name
2022-06-16 19:41:14 +09:00
Dean Herbert
ce3d3a967c
Reimplement missing methods
2022-06-16 19:05:25 +09:00
Dean Herbert
72c5b9009d
Remove local realm
fields in manager classes
2022-06-16 18:56:53 +09:00
Dean Herbert
f3984d98e6
Remove RealmArchiveModelManager
from hierarchy
2022-06-16 18:53:13 +09:00
Dean Herbert
1f3e1b2d97
Combine BeatmapManager
and BeatmapModelManager
into one class
2022-06-16 18:07:04 +09:00
Dean Herbert
4526f8c07d
Move database backup creation to async thread where possible
2022-06-16 17:01:17 +09:00
Dean Herbert
739a696467
Ensure reading of existing databases when making backups doesn't create a file
2022-06-16 16:48:06 +09:00
Dean Herbert
f23ddfe6cc
Move remaining realm classes out of Stores
namespace
2022-06-15 21:56:00 +09:00
Dean Herbert
cca7633e59
Rename variables and remove unnecessary nested call to GetFullPath
2022-06-15 15:05:51 +09:00
Salman Ahmed
22c09ec893
Handle subdirectories during beatmap stable import
2022-06-15 07:33:21 +03:00
Dean Herbert
e96c5ce703
Move and correct xmldoc to interfaces
2022-06-14 20:00:16 +09:00
Dean Herbert
d73c0ca659
Remove unused methods from IModelImporter
...
All the xmldoc is already present in `RealmArchiveModelImporter` so
nothing is lost here.
2022-06-14 19:42:11 +09:00
Dean Herbert
1b4c89c418
Update realm to latest version
...
Contains minor changes to async usage in line with upstream API changes.
I believe a feedback issue we were seeing with offset changes (the only
component using async write flow) may have been resolved by these
upstream changes (see [release
notes](https://github.com/realm/realm-dotnet/releases/tag/10.14.0 )) but
am not investigating further just yet.
2022-06-03 14:16:10 +09:00
Dean Herbert
45841673f6
Update OnlineLookupCache
to use async version of Perform
call
2022-05-30 16:13:13 +09:00
Dean Herbert
4633eed78c
Merge branch 'master' into localisable-filter-items
2022-05-20 23:55:16 +09:00
Dean Herbert
70bd40ce44
Fix incorrect count of beatmaps available to import
2022-05-19 14:01:24 +09:00
Dean Herbert
1b7ec1be26
Add basic test coverage of new screen
2022-05-17 18:15:14 +09:00
Dean Herbert
30fdbc3de0
Add safety against calling GetStableImportPaths
when path doesn't exist
2022-05-17 17:33:54 +09:00
Dean Herbert
4af1a788d1
Add locate stable button / screen
2022-05-17 15:55:53 +09:00
Dean Herbert
13e70eab51
Allow cancellation of count operations and bypassing interactive location logic
2022-05-17 15:55:53 +09:00
Dean Herbert
6448c97929
Allow retrieving count of available stable imports
2022-05-17 15:55:53 +09:00
Dean Herbert
218642c300
Update unsafe file write usages
2022-05-16 18:05:27 +09:00
Dean Herbert
33f024212f
Fix realm refetch operations potentially being unsafe
...
As seen in test failure https://github.com/ppy/osu/runs/6357384721?check_suite_focus=true .
2022-05-10 21:04:30 +09:00
Dean Herbert
043599081b
Split out INotificationOverlay
to allow for easier testing
2022-04-18 20:14:01 +09:00
Dean Herbert
e315313266
Split out IDialogOverlay
to allow for easier testing
2022-04-18 18:36:26 +09:00
Dean Herbert
975883da5c
Move all usages of client.realm
filename to a single const
2022-03-30 13:34:48 +09:00
Dean Herbert
0433d2fe6a
Add safety to realm instance retrieval in RealmAccess
2022-03-29 11:40:58 +09:00
Dean Herbert
ea46e024c1
Avoid deadlock during migration failed exit process
2022-03-29 00:04:13 +09:00
Dean Herbert
b6ae0ebb6f
Limit macOS specific log output to macOS platforms specifically
2022-03-28 23:46:07 +09:00
Dean Herbert
a98aac3bf2
Better inform users of migration failure reason when running Apply Silicon build
...
As mentioned in https://github.com/ppy/osu/discussions/17409#discussioncomment-2445464 ?
2022-03-28 17:34:36 +09:00
Dean Herbert
b04ca111c6
Allow realm subscriptions to be initiated from a non-update thread
2022-03-24 23:41:07 +09:00
Salman Ahmed
c2063f415d
Remove unnecessary MaxCombo
migration between unmapped database fields
2022-03-20 16:27:54 +03:00
Dean Herbert
6565c95b17
Remove unused variable
2022-03-08 18:19:54 +09:00
Dean Herbert
0718a55ad0
Add flow to allow recovery after running an older release (with a different realm database version)
...
As brought up in https://github.com/ppy/osu/discussions/17148
2022-03-08 18:15:28 +09:00
Dean Herbert
2a55c5e02e
Add extension method to detect and isolate realm collection-level changes
2022-03-08 14:50:47 +09:00
Bartłomiej Dach
0fbc018a42
Remove redundant string interpolation prefixes
2022-03-03 20:21:09 +01:00
Dean Herbert
35f532fefa
Add ability to watch properties via a RealmAccess
helper method
2022-03-03 17:42:40 +09:00
Dean Herbert
7d11cfb301
Add detach mapping for BeatmapUserSettings
2022-03-01 20:12:59 +09:00
Dean Herbert
047e801da9
Store and retrieve offset from realm
2022-03-01 20:12:59 +09:00
Dean Herbert
acf8db13ac
Store user settings to realm
2022-03-01 18:44:15 +09:00
Dean Herbert
9a117467b5
Add RealmAccess.WriteAsync
method
2022-03-01 18:44:05 +09:00
Dean Herbert
7fa5842783
Add global statistics output for all realm reads/writes
2022-03-01 18:31:18 +09:00
Dean Herbert
334fe1f120
Add AsSplitQuery
specification to avoid optimisation recommendation log messages
2022-02-15 15:23:17 +09:00
Dean Herbert
8ec28dc8bc
Update OsuDbContext
in line with EF changes
2022-02-15 15:19:50 +09:00
Dean Herbert
908c31c687
Update stream read operations to use new helper methods
2022-02-11 16:02:25 +09:00
Bartłomiej Dach
dc96c4888b
Add support for creating new blank difficulties
2022-02-02 21:55:33 +01:00
Bartłomiej Dach
a378e78ced
Fix RealmLive
unnecessarily passing ID around
...
Appears to have never been needed. When the `retrieveFromID` method was
created in 81b5717ae7
, it didn't use the
`id` parameter for anything either.
2022-02-01 21:35:12 +01:00
Dean Herbert
1a14ccc7ee
Run EF migrations before migrating to realm
...
Turns out that there are more than zero users that are upgrading from
old databases. I think we probably want to support this for now.
Tested against database in https://github.com/ppy/osu/discussions/16700
and one other I had locally, both work correctly.
2022-01-29 23:13:23 +09:00
Dean Herbert
942ea896f1
Skip scores missing beatmaps during realm migration
2022-01-28 01:20:32 +09:00
Dean Herbert
81461be49f
Skip beatmap imports where ruleset is not present in realm
...
Closes #16651 .
When a ruleset is not available, the `Find` call would return null. When
a null is passed to the constructor, `BeatmapInfo` would create an "osu"
ruleset, which tries to get stored to realm and fails on duplicate
primary key.
Probably need to add better safeties against this (or change that
constructor...) but this will fix the migration process.
Probably not serious enough to pull the build. This only affects
rulesets like karaoke which have custom beatmaps.
2022-01-28 00:14:20 +09:00
Dan Balasescu
9ff2b9eb95
Merge pull request #16640 from peppy/realm-migration-always-delete
...
Improve realm migration UX to give users a recovery path on error
2022-01-27 15:43:14 +09:00
Dean Herbert
67ccb87992
Add exception message to discussion template url
2022-01-27 14:56:04 +09:00
Dean Herbert
fb081384e1
Add safety against zip creation potentially failing (probably can't but still)
2022-01-27 14:55:52 +09:00
Dean Herbert
465e7d29fe
Avoid showing the external link warning
2022-01-27 14:53:11 +09:00
Dean Herbert
31abb372e5
Automatically zip and show the backup archive to the user
2022-01-27 14:52:58 +09:00
Dean Herbert
b745252962
Show notification when migration fails to give users a recovery path
2022-01-27 14:39:11 +09:00
Dean Herbert
deb5d75b5f
Change migration process to always delete old EF database
...
It is already backed up, so this is probably fine.
2022-01-27 14:33:46 +09:00
Dean Herbert
587c0f965c
Add more attempts to delete EF database
...
Just noticed in passing. Probably best we do this since it was known to
fail on windows in some rare cases.
2022-01-27 14:32:21 +09:00
Dean Herbert
f21e3d0d86
Block collection loading until realm migration has completed
2022-01-27 00:34:51 +09:00
Dan Balasescu
94d3e2c90c
Merge branch 'master' into fix-out-of-order-events-on-block-fail
2022-01-26 19:08:55 +09:00
Dan Balasescu
b1a23486c5
Merge pull request #16626 from peppy/fix-skin-section-realm-usage
...
Refactor `SkinSection` to avoid unnecessary realm queries
2022-01-26 19:01:15 +09:00
Dean Herbert
45636ce04b
Remove collection ToLive
helper method to avoid confusion
2022-01-26 18:26:37 +09:00
Dean Herbert
3aa681005b
Skip importing scores which have no matching realm ruleset
...
There's no real way to recover these unless we want to start importing
rulesets into realm. And that seems counter productive. This can only
happen if users don't have the dll present any more, and it was removed
far before realm was tracking rulesets (else it would have an
`Available=0` entry in realm to match).
2022-01-26 18:04:54 +09:00
Dean Herbert
885fb92aad
Move final empty result set sending to post-compact
2022-01-26 17:21:57 +09:00
Dean Herbert
791ea0308f
Add flag to guard against deadlocks during blocking operations
2022-01-26 17:09:28 +09:00
Dean Herbert
11f0f3c17d
Revert "Move final result set firing to before the update realm is disposed"
...
This reverts commit 24bcba6418
.
2022-01-26 16:21:24 +09:00
Dean Herbert
24bcba6418
Move final result set firing to before the update realm is disposed
...
Without this, if any registered callback attempts to access
`RealmAccess.Realm` when handling the empty set callback, it will
deadlock the game.
2022-01-26 15:57:06 +09:00
Dean Herbert
5ea781faef
Send
unsubscribe actions to synchronization context for consistency and safety
2022-01-26 15:24:53 +09:00
Dean Herbert
91e0d1021f
Merge branch 'master' into fix-out-of-order-events-on-block-fail
2022-01-26 15:21:10 +09:00