Skip to content

Commit

Permalink
Merge pull request #443 from visciang/main
Browse files Browse the repository at this point in the history
Sync name.dets to disk
  • Loading branch information
kjnilsson authored May 20, 2024
2 parents ad6bb7d + e460557 commit 6b48b15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ra_directory.erl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ deinit(System) when is_atom(System) ->
deinit(#{directory := Name,
directory_rev := NameRev}) ->
_ = ets:delete(Name),
ok = dets:sync(NameRev),
_ = dets:close(NameRev),
ok.

Expand Down Expand Up @@ -94,7 +95,6 @@ unregister_name(#{directory := Directory,
directory_rev := DirRev}, UId) ->
case ets:take(Directory, UId) of
[{_, _, _, ServerName, _}] ->
_ = ets:take(Directory, UId),
ok = dets:delete(DirRev, ServerName),
UId;
[] ->
Expand Down

0 comments on commit 6b48b15

Please sign in to comment.