Realtime: Prevent crash on large row values

Created on 10 Feb 2021  ·  14Comments  ·  Source: supabase/realtime

Bug report

Describe the bug

https://github.com/supabase/realtime/blob/894f4bb8923017467c78803711d8adbef8c090fe/server/lib/realtime/subscribers_notification.ex#L81

This line is sending a websocket message for every column, based on equality

Some columns can be huge text dumps or JSON config so we should add some sensible filters filters here.

  1. It’s probably unnecessary - nobody is going to do an equality match on something > ~500 characters (at least I can’t think of a good use-case - perhaps a URL?)
  2. It could be causing issues. I don’t know about the internals of Phoenix, but sending to a channel name like scrape.eq.