From disk_cache PoV, the test basically does the following:
DoomAllEntries()
if OpenEntry() != OK
CreateEntry()
EXPECT_EQ(OK, OpenEntry())
What's important is that it doesn't wait for DoomAllEntries to complete.
For SimpleCache, DoomAllEntries serializes with respect to other disk cache operations only once index loading has succeeded --- which is a background task which DoomAll has to wait for, but other ops can ignore --- so if the index loading is slow, the following is a possible effective execution ordering:
if OpenEntry() != OK
CreateEntry()
DoomAllEntries()
EXPECT_EQ(OK, OpenEntry())
Which of course fails the expectation.
Not really sure what do with this ATM; we could force serialization with index if a doom-all is pending but may be kind of expensive, and probably doesn't matter in real life?
Comment 1 by sheriffbot@chromium.org
, Nov 19Status: Untriaged (was: Available)