Skip to content

v3.1.3-ferricstore.2

@yoavgeva yoavgeva tagged this 27 Apr 11:40
close_file/1 had a clause `is_pid(Fd) orelse is_reference(Fd)` that
greedily matched our wal_io_module NIF resource handles (which are
Erlang references) and called file:close/1 on them. file:close/1
returns {error, badarg} for arbitrary references, which then made
the calling site `ok = close_file(...)` raise {badmatch, {error, badarg}}.
That killed the WAL gen_server during every shutdown rollover.

The fix narrows the file:close clause to is_pid(Fd); is_tuple(Fd)
(matching the actual io_device() type spec) and adds a separate
is_reference(Handle) clause that goes through the NIF.

Bumps version to 3.1.3-ferricstore.2.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Assets 2
Loading