Skip to content

Add mechanism to abort further processing of a score#353

Merged
peppy merged 2 commits intoppy:masterfrom
bdach:abort-processing
Feb 2, 2026
Merged

Add mechanism to abort further processing of a score#353
peppy merged 2 commits intoppy:masterfrom
bdach:abort-processing

Conversation

@bdach
Copy link
Collaborator

@bdach bdach commented Feb 2, 2026

No description provided.

catch (ProcessingAbortedException abortException)
{
Console.WriteLine($"Aborting processing of score {item.Score.id}: {abortException.Message}");
tags.Add("type:aborted");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to say "This is being added after the tags list is being materialised into an array, so probably won't work." but it turns out there's a second call to populate tags in the finally.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that was intentional if a bit obfuscated. I'd have caught the exception in the outermost scope but I can't rollback the transaction from there.

Part of me wondered if we even want to datadog this at all, but ultimately I decided that this might come useful.

}

foreach (var p in enumerateValidProcessors(score))
p.ApplyGlobal(score, conn);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important to note we don't have the same coverage in ApplyGlobal. Maybe needs consideration for consistency..

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue with that is that it won't be super trivial because ApplyGlobal() runs after the transaction has already committed, so you'd have to actively manually rollback.

As far as I can tell from looking over our usages, we're mostly using ApplyGlobal() for side-/second-order effects of changes, so I don't think it needs that level of validation.

@peppy peppy merged commit d8937fb into ppy:master Feb 2, 2026
3 checks passed
@github-project-automation github-project-automation bot moved this from Inbox to Done in osu! team task tracker Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants