Dan Balasescu
8c120c6bfb
Merge pull request #16491 from peppy/realm-integration/safer-migration
...
Improve safety and logging of realm migration process
2022-01-19 12:23:48 +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
3bc091fe6d
Add ignore rules on more helper properties
2022-01-19 09:46:45 +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
3596c6ed5d
Add some missing IgnoredAttributes
to reduce automapper overhead
2022-01-18 23:25:30 +09:00
Dean Herbert
7f65f3a47f
Remove all usage of BaseDifficulty
(and access Difficulty
instead)
2022-01-18 22:57:39 +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
bb5b9458e8
Remove all EF migrations
2022-01-18 20:42:48 +09:00
Dean Herbert
f5b8653491
Add spaces to query string
2022-01-18 19:28:09 +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
27ea37c690
Rewrite TopLocalRank
to use realm subscriptions
...
This addresses the number one performance concern with realm (when
entering song select). Previous logic was causing instantiation and
property reads of every score in the database due to the `AsEnumerable`
specfication.
2022-01-18 18:17:53 +09:00
Dean Herbert
02baad30d7
Merge branch 'master' into global-bindable-thread-safety
2022-01-18 18:12:00 +09:00
Dean Herbert
d10d657073
Merge pull request #16421 from Susko3/textbox-AllowIme-false
...
Add `AllowIme => false` to text boxes where applicable
2022-01-18 18:02: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
Dan Balasescu
73a1f27ce5
Merge branch 'master' into realm-integration/score-and-beatmaps
2022-01-18 17:31:37 +09:00
Dean Herbert
39c9c4985b
Merge branch 'master' into textbox-AllowIme-false
2022-01-18 17:03:51 +09:00
Dean Herbert
488f044924
Remove one more outdated comment
2022-01-18 16:46:14 +09:00
Dean Herbert
8b8940439e
Fix starting game with non-default ruleset failing
2022-01-18 16:22:15 +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
Dan Balasescu
b4fdd8a986
Merge pull request #16489 from peppy/aggregate-score-tests
...
Add test coverage of aggregate scores displaying correctly at multiplayer/playlists screens
2022-01-18 16:03:06 +09:00
Dean Herbert
a5862ca00d
Improve reliability of mod deserialisation
2022-01-18 15:46:27 +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
d26f4d50bd
Add test coverage of aggregate room scores displaying correctly
2022-01-18 14:00:12 +09:00
Dean Herbert
da9a60a695
Update broken test scenes to match new OsuTestScene
logic
2022-01-18 13:41:50 +09:00
Dean Herbert
b9aae5569f
Fix OsuTestScene
potentially mutating global bindables
2022-01-18 13:29:24 +09:00
Dean Herbert
b9ec860cf2
Ensure global beatmap/ruleset are always mutated from the update thread
...
This came up while testing the new realm thread, where `MusicController`
would fall over when `OsuTestScene` changes the global beatmap from an
async load thread (causing a cross-thread realm access).
We don't want to have to schedule every usage of these bindables, so
this seems like a good constraint to put in place.
2022-01-18 13:29:24 +09:00
Dean Herbert
ebc9d3a613
Fix playlist aggregate scores not displaying (again)
2022-01-18 11:57:38 +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
f9c5000774
Remove obsoleted sentry disposal call and fix incorrectly unbound logger event
2022-01-18 11:27:28 +09:00
Dean Herbert
911a837f62
Update framework
2022-01-18 11:09:35 +09:00
Dean Herbert
125439d177
Update all (non-NET6) nuget packages
2022-01-18 11:09:26 +09:00
Dan Balasescu
e9c96908d5
Merge pull request #16481 from peppy/fix-scores-container-tests
...
Rewrite `TestSceneScoresContainer` to work again
2022-01-17 20:39:14 +09:00
Dean Herbert
12fd279b7d
Add test to check full flow of rebinding gameplay key bindings
...
Addresses a regression found in realm PR that was not covered by tests.
2022-01-17 16:00:17 +09:00
Dean Herbert
51ade3251d
Improve ScoresContainer
loading overlay logic to work better with tests
2022-01-17 15:15:39 +09:00
Dean Herbert
381174e482
Give the placeholder ruleset better defaults to allow tests to work again
2022-01-17 14:40:00 +09:00
Dean Herbert
a0e2106468
Guard against null values getting inserted into database during score/beatmap imports
2022-01-17 14:05:08 +09:00
Dean Herbert
744084b418
Initialise all parameters is paramaterless constructor for now for added safety
2022-01-17 13:51:30 +09:00
Dean Herbert
11ca1b6e7b
Remove one more usage of IsManaged
which could potentially go wrong
2022-01-17 13:40:27 +09:00
Dean Herbert
d27ee2c9fb
Remove incorrect IsManaged
check in ScoreManager
2022-01-17 13:37:42 +09:00
Dean Herbert
a3806f44a5
Add back null
beatmap allowance to GetTotalScore
flow to fix playlist aggregate scores
2022-01-17 13:11:43 +09:00
Dean Herbert
88bf406c22
Fix null reference in equality comparison causing beatmap set overlay to crash
2022-01-17 13:05:55 +09:00
Dean Herbert
5601f6f1fe
Merge branch 'master' into realm-integration/score-and-beatmaps
2022-01-17 12:29:02 +09:00
Dean Herbert
4ac8830d42
Merge pull request #16474 from Susko3/move-version-overlay
...
Move `VersionManager` from `osu.Desktop` to `osu.Game`
2022-01-17 11:53:17 +09:00
Bartłomiej Dach
cbaa3de548
Strip @2x
scale modifiers when looking up legacy skin textures
2022-01-16 19:46:15 +01:00
Susko3
084b1fb470
Load the VersionManager earlier
2022-01-16 15:25:21 +01:00
Dean Herbert
566d341b1e
Split conditions out for readability
2022-01-16 22:04:29 +09:00
Susko3
6e4214de4d
Move VersionManager
from osu.Desktop
to osu.Game
2022-01-15 19:42:38 +01:00
Dean Herbert
565611ee00
Fix typo in inline comment
2022-01-15 23:57:20 +09:00
Dean Herbert
236fa6da7e
Rename ControlPointVisualisation
interface type to be less specific
2022-01-15 23:56:00 +09:00
Dean Herbert
c5cae4e3ee
Rename methods and add xmldoc
2022-01-15 23:55:11 +09:00
Dean Herbert
4ca2822d40
Merge pull request #16447 from nekodex/mp-host-changed-sfx
...
Add audio feedback for host change in multiplayer rooms
2022-01-15 23:43:35 +09:00
Bartłomiej Dach
e75d21507c
Fix GetDisplayTitleRomanisable()
relying on ToString()
implementation
2022-01-15 15:26:41 +01:00
Bartłomiej Dach
03e4ec4214
Merge branch 'master' into realm-integration/score-and-beatmaps
2022-01-15 14:45:42 +01:00
Dean Herbert
671a3d47b8
Move bindable binding to LoadComplete
and remove unnecessary unbind
2022-01-15 21:20:27 +09:00
Dean Herbert
ea8e49c543
Reorder private/protected methods
2022-01-15 21:19:02 +09:00
Dean Herbert
c4976e9db8
Update resources
2022-01-15 20:08:08 +09:00
Dean Herbert
64c499d9d6
Revert unintended temporary commenting (was used during benchmarking)
2022-01-15 15:24:30 +09:00
Susko3
19467e58c1
Remove unused params from BDL methods
2022-01-15 01:06:39 +01:00
Dean Herbert
2984f2f6c4
Fix custom keybindings not working due to incorrect use of IsManaged
flag
2022-01-15 01:22:48 +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
e558fd69d2
Remove unnecessary null check and associated comment
2022-01-14 23:26:29 +09:00
Dean Herbert
3a95425a9e
Remove left-over methods in MusicController
2022-01-14 19:55:49 +09:00
Dean Herbert
7acd1b545f
Remove unnecessary Live
conversion in IntroScreen
(handled by GetWorkingBeatmap
)
2022-01-14 19:55:09 +09:00
Dean Herbert
34dbde6023
Only copy across Hash
and ID
so statistics aren't lost
2022-01-14 18:22:52 +09:00
Jamie Taylor
7e9b5dd150
Add audio feedback for host change in multiplayer
2022-01-14 18:11:00 +09:00
Dean Herbert
916b591b1b
Fix watch replay button not working immediately after playing
2022-01-14 18:03:06 +09:00
Dean Herbert
c64a919a9d
Reduce number of redundant control points displayed on summary timeline
...
As pointed out in https://github.com/ppy/osu/discussions/16435 , beatmaps
with too many control points (usually added via external automation
apps) could cause the lazer editor to grind to a halt.
The overheads here are mostly from the GL side. An eventual goal would
be to render this in a smarter way, rather than using thousands of
drawables. Until that, this optimisation should help reduce the overhead
by omitting control points in close proximity that are redundant for
display purposes.
I've tried to contain this in the display logic directly, with the goal
that it can be ripped out as fast as it was added. Certainly required
more changes than I hoped for, but I don't think it's too ugly.
2022-01-14 17:13:26 +09:00
Dan Balasescu
70f56cd0c9
Merge pull request #16442 from peppy/fix-multiplayer-chat-polling
...
Fix chat poll rate being too low in multiplayer lobby and gameplay
2022-01-14 13:52:37 +09:00
Dean Herbert
dea2e1fac0
Return immediately on failed web request in synchronous BeatmapOnlineLookupQueue
flow
2022-01-14 13:20:51 +09:00
Dean Herbert
8424d86e9a
Remove unused cancellationToken
parameter in synchronous BeatmapOnlineLookupQueue
flow
2022-01-14 13:19:00 +09:00
Dean Herbert
9b33fbbee5
Ensure detached when performing model Clone
operations on BeatmapInfo
/ScoreInfo
2022-01-14 13:08:20 +09:00
Dean Herbert
9936cdbd65
Merge pull request #16443 from nekodex/fail-volume-dip
...
Add volume dip to track during fail sequence
2022-01-14 12:31:22 +09:00
Dean Herbert
55b027228f
Update resources
2022-01-14 11:54:50 +09:00
Dean Herbert
eb5f15a77e
Merge pull request #16420 from bdach/slider-paste-parsing-failures-2
...
Fix pasted sliders having sample points with time at infinity
2022-01-13 23:28:49 +09:00
Dean Herbert
54804ebfbd
Fix delete/clear scores buttons not working
2022-01-13 18:38:38 +09:00
Dean Herbert
c33fe7bcc6
Remove one more unnecessary Detach
operation
2022-01-13 18:32:59 +09:00
Jamie Taylor
c6ae255326
Add volume dip to track during fail sequence
2022-01-13 18:31:32 +09:00
Dean Herbert
2840a71dda
Uncomment EF deletion lines in migrations
2022-01-13 18:28:00 +09:00
Dean Herbert
4f8d29c1c0
Merge branch 'master' into realm-integration/score-and-beatmaps
2022-01-13 18:25:09 +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
ded1d87739
Move RulesetStore
construction earlier in process so rulesets are available for EF migration
2022-01-13 18:23:18 +09:00
Dean Herbert
069d6d2954
Remove pointless compatibility parameter BeatmapSetInfoID
2022-01-13 18:02:10 +09:00
Dean Herbert
4012ef7e7b
Reduce polling rate when idle even if HighPollRate
is requested
2022-01-13 17:33:55 +09:00
Dean Herbert
46d2f305b5
Log chat polling rate changes
2022-01-13 17:31:59 +09:00
Dean Herbert
0bd34253e7
Increase chat polling rate during multiplayer lobby / games
2022-01-13 17:31:49 +09:00
Dean Herbert
2de0c34bc9
Reduce exposure of ChannelManager
2022-01-13 17:10:48 +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
93c78253d6
Add synchronous fetch flow to BeatmapOnlineLookupQueue
...
The async flow doesn't work great with the realm import process. We
might be able to improve on this going forward, but for the time being
adding a synchronous path seems safest.
After all, we are already an an asynchronous (dedicated) thread pool at
this point.
2022-01-13 16:36:54 +09:00
Dean Herbert
bdb2979b2e
Remove async
from Populate
method
2022-01-13 16:36:54 +09:00
Dean Herbert
70c107b434
Remove pointless override method in RealmArchiveModelManager
2022-01-13 16:27:12 +09:00
Dean Herbert
88145dedf1
Remove oudated comments
2022-01-13 15:27:43 +09:00
Dean Herbert
6025fe325d
Fix filter criteria not being applied after carousel loads new beatmap sets
2022-01-13 15:08:51 +09:00
Dean Herbert
0a133c7e97
Fix typo in comment in IntroScreen
2022-01-13 13:47:23 +09:00
Dean Herbert
dcc354aa7c
Fix deleted scores not being cleaned up on next startup
2022-01-13 13:40:09 +09:00
Dean Herbert
7a81fe19f6
Bump realm schema version to allow upgrades
2022-01-13 13:28:46 +09:00
Dean Herbert
b77cb344d5
Use ctor
rather than MemberwiseClone
to guarantee a safer clone of BeatmapDifficulty
2022-01-13 13:23:41 +09:00
Dean Herbert
86b2ac3217
Remove unnecessary Ruleset
null check in BeatmapDifficultyCache
2022-01-13 13:19:49 +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
65dd80e6f6
Sanitise mods / statistics cache logic in ScoreInfo
2022-01-13 12:59:16 +09:00
Dean Herbert
1a29098f3b
Change default value and add comment explaining why skins are never "locally available"
2022-01-13 12:50:18 +09:00
Joseph Madamba
66773f6d7d
Use comments to disable identifier typos instead
2022-01-12 15:49:28 -08:00
Joseph Madamba
5185f6010e
Fix missed identifier typos
2022-01-12 15:46:20 -08:00
Joseph Madamba
b245ffefc1
Merge remote-tracking branch 'upstream/master' into fix-remaining-identifier-names
2022-01-12 15:05:07 -08:00
Bartłomiej Dach
afce976f08
Fix oversubscription to StartTimeBindable.ValueChanged
2022-01-12 19:29:49 +01:00
Bartłomiej Dach
07fc772c24
Merge branch 'master' into slider-paste-parsing-failures-2
2022-01-12 19:06:36 +01:00
Dean Herbert
4c79145c11
Fix potential mod nullref in APIUserScoreAggregate
's CreateScoreInfo
implementation
2022-01-13 00:28:16 +09:00
Dean Herbert
b2d09b7b10
Fix further warnings
2022-01-12 23:42:12 +09:00
Dean Herbert
51251e3204
Fix CI reported warnings
2022-01-12 22:39:00 +09:00
Dean Herbert
08da948afc
Merge branch 'master' into realm-integration/score-and-beatmaps
2022-01-12 19:22:55 +09:00
Dean Herbert
017f5a9b9b
Merge pull request #16430 from smoogipoo/less-harsh-mania-hp
...
Fix mania requiring PERFECTs to maintain HP
2022-01-12 19:07:13 +09:00
Dean Herbert
8c8c5f4c33
Fix skin hash repopulation not working since realm migration
2022-01-12 18:32:51 +09:00
Dan Balasescu
4106ebf881
Fix mania requiring PERFECTs to maintain HP
2022-01-12 18:29:23 +09:00
Dean Herbert
ef0f794fd6
Remove stay newline
2022-01-12 18:13:14 +09:00
Dean Herbert
eb70a1eeb7
Replace compatibility properties with direct references
2022-01-12 18:13:14 +09:00
Dean Herbert
482cf29e28
Merge branch 'master' into realm-integration/score-and-beatmaps
2022-01-12 17:57:14 +09:00
Dean Herbert
e12025dd48
Cascade delete metadata when beatmaps are deleted
2022-01-12 17:49:11 +09:00
Dean Herbert
34aa1bf21d
Sanitise and remove some usages of Detach
which are no longer required
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
Dean Herbert
51d6db1bca
Add equatable support to IUser
and RealmUser
...
Not sure this will stick, but let's add it for now to make testing
detach support work nicely.
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
dc3730f334
Fix song select import popup not always showing
2022-01-12 17:49:11 +09:00
Dean Herbert
017285b694
Update MusicController
to handle deletions more correctly
2022-01-12 17:49:11 +09:00
Dean Herbert
157dfdaa82
Fix protected beatmap sets getting deleted
2022-01-12 17:49:11 +09:00
Dean Herbert
0aff1c232b
Fix deleted/hidden carousel queries
2022-01-12 17:49:11 +09:00
Dean Herbert
72656ae01e
Fix beatmap restore/undelete flows
2022-01-12 17:49:11 +09:00
Dean Herbert
46206f70d6
Fix beatmap mass deletion flow
2022-01-12 17:49:11 +09:00