fix(mnesia): per-slot volumes hint and harden verification lookup.
CI / test (push) Failing after 5m10s
CI / deploy-ift (push) Has been skipped
CI / e2e-ift (push) Has been skipped
CI / deploy-stage (push) Has been skipped
CI / e2e-stage (push) Has been skipped

Avoid shared Mnesia dir across replicas; make get_or_create_token and CT verify_user resilient to brief cross-node lag.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-17 09:54:10 +03:00
parent a696d25486
commit 5e569da1d8
4 changed files with 62 additions and 16 deletions
+8 -1
View File
@@ -229,7 +229,7 @@ add_local_ram_copy(Tab) ->
end.
wait_for_tables_available() ->
lists:foreach(fun(Tab) -> wait_for_table(Tab) end, ?DISC_TABLES).
lists:foreach(fun(Tab) -> wait_for_table(Tab) end, ?DISC_TABLES ++ ?RAM_TABLES).
wait_for_table(Tab) ->
case lists:member(Tab, mnesia:system_info(tables)) of
@@ -260,6 +260,12 @@ prune_dead_nodes() ->
false -> ok
end
end, ?DISC_TABLES),
lists:foreach(fun(Tab) ->
case lists:member(Node, mnesia:table_info(Tab, ram_copies)) of
true -> catch mnesia:del_table_copy(Tab, Node);
false -> ok
end
end, ?RAM_TABLES),
catch mnesia:del_table_copy(schema, Node)
end, DeadNodes).
@@ -327,6 +333,7 @@ create_indices() ->
mnesia:add_table_index(calendar_specialist, user_id),
mnesia:add_table_index(user, nickname),
mnesia:add_table_index(user, email),
mnesia:add_table_index(verification, user_id),
mnesia:add_table_index(notification, user_id),
mnesia:add_table_index(notification, is_read),
mnesia:add_table_index(auth_session, family_id),