Skip to content
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

"cannot instantiate abstract model Relationship::Content::Notification" #104

Open
felixkrohn opened this issue Jul 10, 2024 · 4 comments
Open
Labels
bug Something isn't working

Comments

@felixkrohn
Copy link

since updating to v2.0.0-11 I have the above message when clicking on "Notifications" I get the above message.
In the logs it usually comes after:

2024-07-10T21:22:54.546321Z NOTICE - database: Slow query [   232.129ms] -- SELECT count(*) FROM relationships AS n LEFT JOIN activities AS a ON a.iri = n.to_iri LEFT JOIN actors AS c ON c.iri = a.actor_iri LEFT JOIN objects AS o ON o.iri = a.object_iri LEFT JOIN objects AS e ON e.iri = n.to_iri LEFT JOIN actors AS t ON t.iri = e.attributed_to_iri WHERE +n.from_iri = ? AND n.type IN ("Relationship::Content::Notification::Announce","Relationship::Content::Notification::Follow","Relationship::Content::Notification::Like","Relationship::Content::Notification::Mention","Relationship::Content::Notification::Reply","Relationship::Content::Notification::Follow::Hashtag","Relationship::Content::Notification::Follow::Mention","Relationship::Content::Notification::Follow::Thread","Relationship::Content::Notification")  AND "c".deleted_at IS NULL AND "c".blocked_at IS NULL   AND "o".deleted_at IS NULL AND "o".blocked_at IS NULL   AND "a".undone_at IS NULL   AND "e".deleted_at IS NULL AND "e".blocked_at IS NULL   AND "t".deleted_at IS NULL AND "t".blocked_at IS NULL   AND n.created_at > ? -- args: ["https://sozial.dezern.at/actors/felix", 2024-07-10 10:41:02.0 UTC]
2024-07-10T21:22:54.546576Z NOTICE - database: [{0, "SCAN n"}, {0, "SEARCH a USING INDEX idx_activities_iri (iri=?) LEFT-JOIN"}, {0, "SEARCH c USING INDEX idx_actors_iri (iri=?) LEFT-JOIN"}, {0, "SEARCH o USING INDEX idx_objects_iri (iri=?) LEFT-JOIN"}, {0, "SEARCH e USING INDEX idx_objects_iri (iri=?) LEFT-JOIN"}, {0, "SEARCH t USING INDEX idx_actors_iri (iri=?) LEFT-JOIN"}]

But I'm not 100% sure if it's related.

Again, not sure how to debug this further?

@toddsundsted
Copy link
Owner

@felixkrohn it sounds like there is a record in your database with the type Relationship::Content::Notification which is abstract. that general type should have been migrated to more specific types in the past. (this migration i'm pretty sure.)

i'm considering a more durable fix for this, but the quick fix is to delete all records of type "Relationship::Content::Notification" from your database.

something like:

delete from relationships where type = "Relationship::Content::Notification";

@toddsundsted
Copy link
Owner

what version of Ktistec are you running?

@felixkrohn
Copy link
Author

what version of Ktistec are you running?

v2.0.0-11

The delete from seems to have done the trick, there were 20 matching records.

@toddsundsted
Copy link
Owner

thanks! i'm going to leave this open for a short time while i add a bit more resiliency here.

@toddsundsted toddsundsted added the bug Something isn't working label Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants