Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dcorbacho committed Feb 16, 2023
1 parent e00c5c9 commit c9ac116
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
8 changes: 5 additions & 3 deletions deps/rabbit/src/rabbit_db_exchange.erl
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,13 @@ update_in_khepri(XName, Fun) ->
ok;
{error, {khepri, mismatching_node, _}} ->
update_in_khepri(XName, Fun);
{error, {khepri, node_not_found, _}} ->
ok;
{error, _} = Error ->
Error
end;
{error, {khepri, node_not_found, _}} ->
not_found;
ok;
{error, _} = Error ->
Error
end.
Expand Down Expand Up @@ -499,7 +501,7 @@ next_serial_in_mnesia_tx(XName) ->
#exchange_serial{name = XName, next = Serial + 1}, write),
Serial.

next_serial_in_khepri(#exchange{name = XName} = X) ->
next_serial_in_khepri(XName) ->
%% Just storing the serial number is enough, no need to keep #exchange_serial{}
Path = khepri_exchange_serial_path(XName),
Ret1 = rabbit_khepri:adv_get(Path),
Expand All @@ -513,7 +515,7 @@ next_serial_in_khepri(#exchange{name = XName} = X) ->
ok ->
Serial;
{error, {khepri, mismatching_node, _}} ->
next_serial_in_khepri(X);
next_serial_in_khepri(XName);
Err ->
Err
end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ setup_schema() ->
}).

setup_schema_in_mnesia() ->
mnesia:create_table(?RH_TABLE,
[{attributes, record_info(fields, cached)},
{record_name, cached},
{type, set}]),
mnesia:add_table_copy(?RH_TABLE, node(), ram_copies),
_ = mnesia:create_table(?RH_TABLE,
[{attributes, record_info(fields, cached)},
{record_name, cached},
{type, set}]),
_ = mnesia:add_table_copy(?RH_TABLE, node(), ram_copies),
rabbit_table:wait([?RH_TABLE]),
ok.

Expand Down

0 comments on commit c9ac116

Please sign in to comment.