Skip to content

Commit

Permalink
Advise dont_need after closing WAL.
Browse files Browse the repository at this point in the history
  • Loading branch information
kjnilsson committed Dec 18, 2024
1 parent 16928fc commit ddfbec9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ra_log_wal.erl
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ roll_over(#state{wal = Wal0, file_num = Num0,
Half + rand:uniform(Half);
#wal{ranges = Ranges,
filename = Filename} ->
_ = file:advise(Wal0#wal.fd, 0, 0, dont_need),
ok = close_file(Wal0#wal.fd),
MemTables = Ranges,
%% TODO: only keep base name in state
Expand Down

0 comments on commit ddfbec9

Please sign in to comment.