-
Notifications
You must be signed in to change notification settings - Fork 3
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
[bug fix] Drop support for JOIN queries #6
Conversation
Pull Request Branch: donaldong/drop_support_for_join_queries Pull Request Link: #6 Pull Request Stack: donaldong/beta-1
732060f
to
52f74c7
Compare
teacher = Teacher.create! | ||
expect_to_use_redis do | ||
expect_not_to_use_redis do |
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.
Technically we can support this query though right? What's an example join query that wouldn't be supported well, as long as we have this change to make sure that a filtering condition exists on the table we're selecting?
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.
Great question! Currently, it's possible to select columns from a table that does not have any filtering conditions:
SELECT "teacher_id" FROM "sites" INNER JOIN "teacher_sites" ON "sites"."id" = "teacher_sites"."site_id" WHERE "sites"."id" IN (...)
this query should be invalidated when teacher_sites records have changed
Pull Request Branch: donaldong/drop_support_for_join_queries Pull Request Link: #6 Pull Request Stack: donaldong/beta-1
52f74c7
to
db1e4f3
Compare
Summary
We don't really support JOINs well. Currently, it's still possible to have stale cache results if we are selecting from joined tables that do not filter conditions.
This drops the support for JON queries and we can revisit this later.
Test Plan
📚 Related Pull Requests 📚