which seems to be from the overlap of keys between threads that are supposed to have their own keys, since there is no separation between the thread number and key number on the set line (e.g. thread_cache.set("foo#{n}#{i}", "v#{n}")). So thread 1, key 11 uses the key foo111, which is the same key as for thread 11, key 1.
Solution
Add a separator between the thread number and key number.
@casperisfine for review
Problem
I noticed another flaky concurrency test failure on CI:
which seems to be from the overlap of keys between threads that are supposed to have their own keys, since there is no separation between the thread number and key number on the set line (e.g.
thread_cache.set("foo#{n}#{i}", "v#{n}")
). So thread 1, key 11 uses the keyfoo111
, which is the same key as for thread 11, key 1.Solution
Add a separator between the thread number and key number.