superfly / fly_postgres_elixir

Library for working with local read-replica postgres databases and performing writes through RPC calls to other nodes in the primary Fly.io region.
https://hex.pm/packages/fly_postgres
Apache License 2.0
104 stars 10 forks source link

Fly Postgres breaks with Fly.RPC 0.2.1 #38

Closed nicanor closed 1 year ago

nicanor commented 1 year ago

Hi. I updated my dependencies and it failed saying that Fly.is_primary?() does not exist. Its because of a breaking change in Fly RPC: https://github.com/superfly/fly_rpc_elixir/commit/5f0add359566553e06a1296e0870e8e5080132b9

I updated all instances in my code to Fly.RPC.is_primary? But it's still failing saying the code in this library also has calls to Fly.is_primary?

E.g. Here: https://github.com/superfly/fly_postgres_elixir/blob/00378fa89e72cd655ef4397adbeed304bd51ea1b/lib/lsn/lsn_reader.ex#L87C8-L87C25

I haven't checked all the code, but there may be other lines where this is called. Thanks in advance!

brainlid commented 1 year ago

Fixed with new fly_postgres v0.3.3. Thanks for reporting this!