diff --git a/lib/supavisor/client_handler.ex b/lib/supavisor/client_handler.ex index 01c3e2b5..21613f81 100644 --- a/lib/supavisor/client_handler.ex +++ b/lib/supavisor/client_handler.ex @@ -618,7 +618,10 @@ defmodule Supavisor.ClientHandler do {:next_state, :idle, %{data | db_pid: db_pid, stats: stats}, handle_actions(data)} :read_sql_error -> - Logger.error("ClientHandler: read only sql transaction, reruning the query to write pool") + Logger.error( + "ClientHandler: read only sql transaction, rerunning the query to write pool" + ) + # release the read pool _ = handle_db_pid(data.mode, data.pool, data.db_pid) diff --git a/lib/supavisor/manager.ex b/lib/supavisor/manager.ex index d8f56bf5..55c851e4 100644 --- a/lib/supavisor/manager.ex +++ b/lib/supavisor/manager.ex @@ -3,9 +3,9 @@ defmodule Supavisor.Manager do use GenServer, restart: :transient require Logger - alias Supavisor.Helpers, as: H alias Supavisor.Protocol.Server alias Supavisor.Tenants + alias Supavisor.Helpers @check_timeout 120_000 @@ -34,7 +34,7 @@ defmodule Supavisor.Manager do @impl true def init(args) do - H.set_log_level(args.log_level) + Helpers.set_log_level(args.log_level) tid = :ets.new(__MODULE__, [:protected]) [args | _] = Enum.filter(args.replicas, fn e -> e.replica_type == :write end)