apr

apr

ETS set table write concurrency option is not respected

I am noticing something strange on elixir 1.9.4 with erlang 22.2.

Erlang/OTP 22 [erts-10.6] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe]

Interactive Elixir (1.9.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(app@127.0.0.1)1>  :ets.new(:test_table, [:set, :named_table, :public, {:write_concurrency, true}, {:read_concurrency, true}])  
:test_table
iex(app@127.0.0.1)2>  :ets.info(:test_table)
[
  id: #Reference<0.3021804751.1718747137.69759>,
  read_concurrency: true,
  write_concurrency: false,
  compressed: false,
  memory: 301,
  owner: #PID<0.2177.7>,
  heir: :none,
  name: :test_table,
  size: 0,
  node: :"app@127.0.0.1",
  named_table: true,
  type: :set,
  keypos: 1,
  protection: :public
]

It appears that the write_concurrency property is not being respected. Does anybody know if this is a regression?

Marked As Solved

garazdawi

garazdawi

Erlang Core Team

It is part of the OTP-16315 optimization where any locks around ETS tables are removed when using only 1 scheduler.

13
Post #4

Also Liked

garazdawi

garazdawi

Erlang Core Team

Well, technically the locks in the ETS table still use read_concurrency, there just aren’t any :wink:

It is just an oversight on my part that it is not removed. I’ll make a note of fixing that in a future release.

NobbZ

NobbZ

No, on systems where only one scheduler is started.

This is the default for single core machines, but you can also do that via runtime flags.

Where Next?

Popular in Questions Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
sacepums
Hey guys. I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

Other popular topics Top

openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
sergio
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

We're in Beta

About us Mission Statement