-
-
Notifications
You must be signed in to change notification settings - Fork 326
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
fix: Reduce janitor scope to only local tenants #1303
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
lib/realtime/tenants/janitor.ex
Outdated
@@ -65,7 +65,7 @@ defmodule Realtime.Tenants.Janitor do | |||
Logger.info("Janitor started") | |||
%{chunks: chunks, tasks: tasks} = state | |||
all_tenants = :ets.select(@table_name, [{{:"$1"}, [], [:"$1"]}]) | |||
connected_tenants = :ets.select(@syn_table, [{{:"$1", :_, :_, :_, :_, :_}, [], [:"$1"]}]) | |||
connected_tenants = :ets.select(@syn_table, [{{:"$1", :_, :_, :_, :_, Node.self()}, [], [:"$1"]}]) |
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.
Sweet match specs. Technically it probably should be {:const, Node.self()}
but I think that it will not cause any issues there.
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.
will do the change so it's more correct
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.
🎉 This PR is included in version 2.34.26 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
What kind of change does this PR introduce?
Reduce janitor scope to only local tenants
