[erlang-questions] ets table disappears after bad query
Mon May 2 10:51:57 CEST 2011
On 2 mai 2011, at 10:34, Carlo Bertoldi <> wrote:
> On 02/05/2011 07:54, Todd wrote:
>> I have an ets query that is broken. The funny thing is that after the query fails, the ets table disappears...
>> 6. Is this expected behaviour? What would I have to do to prevent losing my ets table?
> Yes. To avoid this you should create the table in a process, start it without linking to it, and then run you query.
> Then the crash due to the wrong query shouldn't bring down you ets.
An other alternative would be to declare an other process as the table's owner and the shell process as inheritor. That way, the owner process dies on a bad query, the shell gets the intact table back and can just create a new sacrificial process to own the table for the next query.
More information about the erlang-questions