Skip to content

Commit

Permalink
Always ensure publication filters are aligned with shapes
Browse files Browse the repository at this point in the history
  • Loading branch information
msfstef committed Dec 12, 2024
1 parent 850d112 commit 985ed08
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/sync-service/lib/electric/shape_cache.ex
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ defmodule Electric.ShapeCache do
recover_shapes(state)
end

# ensure publication filters are in line with existing shapes
{publication_manager, publication_manager_opts} = opts.publication_manager
publication_manager.refresh_publication(publication_manager_opts)

# do this after finishing this function so that we're subscribed to the
# producer before it starts forwarding its demand
send(self(), :consumers_ready)
Expand Down Expand Up @@ -340,9 +344,6 @@ defmodule Electric.ShapeCache do
|> Electric.ShapeCache.Storage.unsafe_cleanup!()
end
end)

# ensure publication filters are in line with existing shapes
publication_manager.refresh_publication(publication_manager_opts)
end

defp start_shape(shape_handle, shape, state) do
Expand Down

0 comments on commit 985ed08

Please sign in to comment.