Skip to content

Conversation

@mjquinlan2000
Copy link

There is a bottleneck in the way that ExAudit.CustomData stores pids in the ETS table. I was getting GenServer.call time out errors on my server. This PR ensures that the pid is written to ETS before the pid is stored in the GenServer. The GenServer is invoked with a cast instead of a call to make the request non-blocking. In handle_cast({:store ... the GenServer will first try to monitor the pid. Then it will check to see if the pid is still alive. If it is not, it will immediately remove it from the ets table. This prevents blocking the call in application code.

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.

1 participant