You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid race when deduplicating frozen strings. Fixes#4970.
The logic here goes like this:
* Attempt to lookup the dedup'ed string.
* If found, return it.
* Try to insert new dedup'ed string.
* If nobody beat us to it, return it.
* If someone beat us to it and the reference is still good, return
it.
* If someone beat us to it and the reference is vacated,
atomically replace it or retrieve any updates that beat us.
* Keep trying until we succeed in updating or get back a populated
reference.
Previously, there could be a race if two threads try to dedup the
same string at the same time. Only one would get in the cache, but
the n+1 threads might not return the already-cached value.
0 commit comments