Re: ETS table with only counters

Eric Pailleau <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <[email protected]>
Hi, 
Documentation says that operation is guaranteed to be atomic and isolated. 

Envoyé depuis mon mobile 

---- Frank Muller a écrit ----

>Hi guys,
>
>I've a ETS (type of "set") which contains ONLY counters
>(ets:update_counter/3).
>
>This table is heavily used and the counters get incremented and decremented
>at different rates.
>
>Question: how should i set my table?
>1. both concurrency set to true:
>    [ set
>    , {read_concurrency, true}
>    , {write_concurrency, true} ].
>
>2. only read concurrency set to true:
>    [ set
>    , {read_concurrency, true}
>    , {write_concurrency, false} ].
>
>3. only write concurrency set to true:
>    [ set
>    , {read_concurrency, false}
>    , {write_concurrency, true} ].
>
>Please explain why?
>
>/Frank
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.