Skip to content

Update init_it to match modern gen_server:init_it#24

Merged
michaelklishin merged 1 commit intorabbitmq:masterfrom
the-mikedavis:init-ignore
Mar 18, 2026
Merged

Update init_it to match modern gen_server:init_it#24
michaelklishin merged 1 commit intorabbitmq:masterfrom
the-mikedavis:init-ignore

Conversation

@the-mikedavis
Copy link
Copy Markdown
Collaborator

This change roughly syncs the init_it with gen_server's. The nice part of this is that we can now return ignore and {error, Reason} which are supported by gen_server but not gen_batch_server. ignore might be useful for ra_log_wal when there is no available disk space.

This change roughly syncs the init_it with gen_server's. The nice part
of this is that we can now return `ignore` and `{error, Reason}` which
are supported by `gen_server` but not `gen_batch_server`. `ignore` might
be useful for `ra_log_wal` when there is no available disk space.
@michaelklishin
Copy link
Copy Markdown
Contributor

@the-mikedavis thank you. Good idea.

We need to bump Erlang/OTP minimum to 26, though, that seems to be the first version
that provides proc_lib:init_fail/3.

Plus some type specs were not updated.

I have a follow-up PR in the works that further narrows the gap with modern gen_server, currently running benchmarks to confirm my changes did not regress.

michaelklishin added a commit that referenced this pull request Mar 18, 2026
Upgrade to match modern `gen_server` (continuation of #24)
@michaelklishin michaelklishin merged commit 34a0615 into rabbitmq:master Mar 18, 2026
@the-mikedavis the-mikedavis deleted the init-ignore branch March 18, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants