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

Api endpoint for listing read posts #4934 #5264

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

leoseg
Copy link
Contributor

@leoseg leoseg commented Dec 14, 2024

Added the read only flag to the post list endpoint and a unittest

@phiresky
Copy link
Collaborator

You probably want an index on post_actions (person_id, read) where read is not null to make this query performant

@leoseg
Copy link
Contributor Author

leoseg commented Dec 15, 2024

@phiresky this index is already existing, created in the migration smoosh-tables-together from 2024-11-10

@phiresky
Copy link
Collaborator

which one do you mean?

@leoseg
Copy link
Contributor Author

leoseg commented Dec 15, 2024

In migrations/2024-11-10-134311_smoosh-tables-together/up.sql in line 294 there is an index named 'idx_post_actions_read_not_null' created on (person_id, post_id) where read is not null. I also can see it in my local deployment db

@phiresky
Copy link
Collaborator

Yes. I do not think that index is adequate. See also #4459 (comment)

@leoseg
Copy link
Contributor Author

leoseg commented Dec 15, 2024

ah sorry read it wrong, i added the index to the pull request

@leoseg
Copy link
Contributor Author

leoseg commented Dec 19, 2024

Hi woodpecker failed on one of the federated api tests but in my local setup they ran trough, did you have this issue before ?

crates/db_views/src/post_view.rs Outdated Show resolved Hide resolved
@Nutomic
Copy link
Member

Nutomic commented Dec 20, 2024

Hi woodpecker failed on one of the federated api tests but in my local setup they ran trough, did you have this issue before ?

Yes this sometimes happens and then fixes itself again, very tricky to debug. Ive restarted the build, you can also restart it yourself with git commit --allow-empty -m ci and git push.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants