Skip to content

Fix crash when committing to deleted ETS table during member removal#559

Open
MorganaFuture wants to merge 1 commit intorabbitmq:mainfrom
MorganaFuture:MorganaFuture/fix/commit_deleted_table
Open

Fix crash when committing to deleted ETS table during member removal#559
MorganaFuture wants to merge 1 commit intorabbitmq:mainfrom
MorganaFuture:MorganaFuture/fix/commit_deleted_table

Conversation

@MorganaFuture
Copy link

Fixes crash when removing and re-adding cluster members (#528).
Added defensive handling in ra_mt:commit/1 to catch badarg from ets:insert/2 when table is deleted. Returns empty list instead of crashing.

Fixes race condition in issue rabbitmq#528 where removing and re-adding a
cluster member causes a crash in ra_mt:commit/1.
Wrap ets:insert/2 in catch block to gracefully handle
deleted tables. Return empty list instead of crashing.
@kjnilsson
Copy link
Contributor

kjnilsson commented Oct 23, 2025

Thank you for this. I think we need to work out why the ETS table is deleted before the ra process has finished its current processing. Are you able to spent time working this out?

@michaelklishin
Copy link
Contributor

@MorganaFuture are you able to investigate what can be the root cause for such ETS table deletion cases?

This is a band-aid PR, we would like to understand the underlying problem.

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.

3 participants