[erlang-questions] ets table disappears after bad query

Todd t.greenwoodgeer@REDACTED
Mon May 2 16:58:05 CEST 2011


Thanks for all the responses. Funny enough, I remember reading about 
this in the books/docs somewhere, but it's altogether another thing to 
encounter this in the wild.


On 5/2/11 1:51 AM, Masklinn wrote:
> On 2 mai 2011, at 10:34, Carlo Bertoldi<carlo.bertoldi@REDACTED>  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.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list