Record the SQLite APPLY fix for leaderboard endpoints
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+9
-9
@@ -543,7 +543,7 @@ loads, and `GET /player/76561199407393962` returns 404 rather than 500.
|
||||
|
||||
### Phase 3: Importer
|
||||
|
||||
**Importer done 2026-11-09** (`pleb/main` at `737575b`, not pushed yet). Usage
|
||||
**Importer done 2026-11-09** (`pleb/main` at `e3f991c`, pushed to Gitea). Usage
|
||||
and the full file → table mapping are in the fork's `MIRROR.md`. A full import
|
||||
takes about 11 s, and an unchanged rerun writes 0 rows. What differs from the
|
||||
steps below:
|
||||
@@ -580,14 +580,14 @@ archived upstream responses, on a scratch DB with `ASPNETCORE_ENVIRONMENT=Mirror
|
||||
triangle ratings.
|
||||
- `/accgraph` and `/history/triangle` match. `/score/statistic/{id}` redirects
|
||||
to the local file.
|
||||
- **Open: `/leaderboard/{id}` and `/leaderboard/scores/{id}` return 500.**
|
||||
`LeaderboardController.GeneralScores` projects
|
||||
`Player.Clans.OrderBy(…ClanOrder…).Take(1)`, which needs SQL `APPLY`, and
|
||||
SQLite has none. The same pattern appears about 8 times, in
|
||||
`ScoreController`, `ReplayController`, `LeaderboardController` and
|
||||
`ClanUtils`. Fix it in a separate server commit before phase 4. For example,
|
||||
skip the clan projection in MirrorMode (there are no clans), or move the
|
||||
ordering client-side.
|
||||
- `/leaderboard/{id}` and `/leaderboard/scores/{id}` first returned 500.
|
||||
About 10 projections order `Player.Clans` by an expression over the outer
|
||||
row's `ClanOrder`, which needs SQL `APPLY`, and SQLite has none. **Fixed**
|
||||
in `e3f991c`: `Utils/MirrorQueryInterceptor.cs`, an EF query interceptor
|
||||
registered only in MirrorMode, rewrites any ordering of `Player.Clans` to
|
||||
ordering by clan id. One file instead of patching every call site; the
|
||||
mirror has no clans, so the order doesn't matter. The leaderboard,
|
||||
clan-ranking and context variants now return 200.
|
||||
|
||||
The check below (stock website) is still to do in phase 4.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user