Get rid of 'synchronized (String.intern())'
Description
Environment
None
Activity
Show:

Abhinav Gupta December 16, 2019 at 6:40 PM
Yes, this is done. Closing this

Manu B December 4, 2019 at 6:49 AM
Is there anything pending here? Looks like all are merged.

Abhinav Gupta November 25, 2019 at 7:58 AM
Manu, can you help here?

Michael Vorburger November 26, 2018 at 3:52 PM
and perhaps you can help with getting the Gerrit Reviews (above) for this one in?

Robert Varga November 26, 2018 at 2:35 PM
this needs to be reviewed/driven to conclusion, I cannot track it anymore.
Genius and Netvirt are using a very funky locking scheme, which is precisely:
From software design perspective, this is bonkers, as this synchronizes with any entity performing this same thing (or accidentally uses synchronized(String)) – leading to potential collisions and preventing reasoning about locks.
From performance perspective, this is purely abysmal, as String.intern() is forcing a round-trip to the JVM level, cannot be optimized and is slow – as detailed in https://shipilev.net/jvm-anatomy-park/10-string-intern/ .
This needs to tackle only hiding this monstrosity behind an API, not with a complete migration of netvirt code to some other locking scheme.