1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-07 16:07:25 +08:00
Commit Graph

135 Commits

Author SHA1 Message Date
Dean Herbert
bf10f2db2e Add test coverage of nested rollback for good measure 2022-07-07 18:19:01 +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
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
98938821e5 Merge branch 'master' into beatmap-update-flow 2022-06-30 16:44:17 +09:00
Dean Herbert
0abb400f64 Add reproduction of transaction not being exited correctly 2022-06-30 15:15:09 +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
d64959ad0c Add test coverage of async writes during a blocking operation 2022-06-28 17:07:49 +09:00
Dean Herbert
6203885040 Add test coverage of realm async writes 2022-06-27 19:38:14 +09:00
Dean Herbert
1fc4fa6820 Remove unnecessary Task.Run workaround in tests 2022-06-27 19:21:05 +09:00
Dean Herbert
5af1106fa5 Remove unused using statement 2022-06-27 18:04:52 +09:00
Dean Herbert
8c3c1f095e Update rollback test expectations
I can't find a better way to do this. It's very hard to trigger an
actual failure in the import process these days. For now I've just made
this work with the new assumptions. May be worth removing the test in
the future if this ever backfires.
2022-06-27 17:04:35 +09:00
Dean Herbert
31a447fda0 Update parameter discards 2022-06-24 21:26:19 +09:00
Dean Herbert
06d59b717c Move beatmap processing tasks to new BeatmapUpdater class 2022-06-24 21:02:37 +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
Dan Balasescu
c402e90598
Merge pull request #18777 from peppy/output-directory-on-import-failure
Silence exception and provide more log output when import fails due to empty `.osu` files
2022-06-20 17:36:21 +09:00
Dean Herbert
e82d948acc Add test coverage of import throwing when no valid .osu files are found 2022-06-20 16:06:22 +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
Dean Herbert
f3984d98e6 Remove RealmArchiveModelManager from hierarchy 2022-06-16 18:53:13 +09:00
Dean Herbert
84dba36cf5 Update usages of BeatmapModelManager which only require importing to use BeatmapImporter 2022-06-16 17:59:24 +09:00
Dean Herbert
f23ddfe6cc Move remaining realm classes out of Stores namespace 2022-06-15 21:56:00 +09:00
Dean Herbert
080f2859ef
Merge pull request #18689 from peppy/quick-import-only-on-batch
Always perform full consistency checks for single imports
2022-06-15 17:06:06 +09:00
Salman Ahmed
3d638abc52 Fix test files stream not disposed after creation 2022-06-15 08:24:20 +03:00
Salman Ahmed
ee8045d507 Add failing test case 2022-06-15 07:33:21 +03:00
Dean Herbert
cac724f436 Re-enable ignored tests that will work again now 2022-06-15 00:51:08 +09:00
Dean Herbert
f11fe54385 Remove custom hash function flow 2022-06-15 00:42:30 +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
218642c300 Update unsafe file write usages 2022-05-16 18:05:27 +09:00
Dean Herbert
87f6f74795 Add failing test coverage of adding a file to a detached beatmap across threads 2022-05-10 21:04:30 +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
4d0b4c2541 Fix realm potentially not being refreshed in time for test asserts in BeatmapImporterTests
As seen at https://github.com/ppy/osu/runs/5659368512?check_suite_focus=true

Went through every usage of `.Import` and added either an
`EnsureLoaded`, or where that provides too many checks, an explicit
`realm.Refresh()`.
2022-03-24 12:59:17 +09:00
Dean Herbert
0fcb3bdba9 Fix beatmap date added not being updated on reimporting a soft deleted beatmap
Addresses concerns raised in https://github.com/ppy/osu/discussions/17399.
2022-03-22 14:10:36 +09:00
Dean Herbert
2a55c5e02e Add extension method to detect and isolate realm collection-level changes 2022-03-08 14:50:47 +09:00
Dean Herbert
1485a3a28a Add test coverage of proeprty changed subscriptions 2022-03-03 17:56:49 +09:00
Dean Herbert
9a117467b5 Add RealmAccess.WriteAsync method 2022-03-01 18:44:05 +09:00
Dean Herbert
0138f22c8d Update existing usages to point to RealmRulesetStore 2022-02-16 17:13:54 +09:00
Dean Herbert
714177cce1 Remove pointless constructor in RulesetInfo 2022-01-27 15:37:27 +09:00
Dean Herbert
abe2cccaae Fix completely invalid method of testing realm migration 2022-01-26 19:03:26 +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
Dean Herbert
cd71ec0edd Remove ILive<> interface (and use abstract Live<> instead) 2022-01-26 13:38:56 +09:00
Dean Herbert
ffd7877a1e Remove synchronization context hacks in realm tests 2022-01-25 17:41:22 +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
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
ae0fea8e26 Fix compilation issues due to misnamed fild 2022-01-25 15:29:45 +09:00
Dean Herbert
35e1c7de7d Merge branch 'master' into realm-block-timeout-assert-failure 2022-01-25 15:05:11 +09:00
Dean Herbert
bda77fb6b3
Merge branch 'master' into realm-block-timeout-assert-failure 2022-01-25 14:47:34 +09:00