-
-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] support canceling scheduled tasks, some federation API performance improvements #2329
[feature] support canceling scheduled tasks, some federation API performance improvements #2329
Conversation
…hanged Create:Note fMsg logic)
@@ -358,15 +357,6 @@ func (p *fediAPI) CreateAnnounce(ctx context.Context, fMsg messages.FromFediAPI) | |||
return gtserror.Newf("db error inserting status: %w", err) | |||
} | |||
|
|||
// Ensure boosted status ancestors dereferenced. We need at least | |||
// the immediate parent (if present) to ascertain timelineability. | |||
if err := p.federate.DereferenceStatusAncestors(ctx, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this check still performed somewhere? I remember this being quite important to avoid seeing unwanted statuses (replies to blocked domains etc) in the timeline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you mean by check, as this is a dereference of status ancestors. Though it is something that will be handled by the DereferenceAnnounce
function above, though I have just realized a quick tweak it might need now... I'll also add a note here explaining why we don't need to dereference ancestors, i.e. because it's handled within the DereferenceAnnounce()
function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, sorry I wasn't very clear. What I meant was:
The below call to p.surface.timelineAndNotifyStatus
will derive timelineability of the provided status, in part, from the visibility of the status's parent.
Previously, this call to p.federate.DereferenceStatusAncestors
ensured that this status parent was set (if present) before the status gets passed into p.surface.timelineAndNotifyStatus
, thus ensuring that it's not timelined if the parent is not visible for whatever reason.
By removing this synchronous call here to dereference the status's ancestors, you may be reintroducing a bug where statuses sometimes got timelined when they shouldn't (eg., the status is a boost of a reply to someone on a blocked domain).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhhh gotcha. Makes sense. Will fix it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated our RefreshStatus()
and GetStatusByURI()
fucntions to handle status parent dereferencing synchronously in the cases where they're dereferencing a new status :)
Looking good. Just not sure about the panicking! |
Description
Checklist
go fmt ./...
andgolangci-lint run
.