Joe McDonnell has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/20026


Change subject: IMPALA-12194: Fix flakiness in DataCacheTest.SetReadOnly
......................................................................

IMPALA-12194: Fix flakiness in DataCacheTest.SetReadOnly

DataCacheTest.SetReadOnly spawns a bunch of threads and
then sets the cache to read only. The threads do a bunch
of stores to the cache and then a bunch of reads. The
test DCHECKs that at least one of the reads will be a cache
miss, because at least one store can't happen because the
cache is read only. This is racy, because it is possible for
the threads to complete all the stores before the cache
is set to read only.

This modifies the test to spawn half the threads, then set
the cache read only, then spawn the other half of the threads.
This guarantees that some threads can't complete their stores,
so the DCHECK won't fire.

Testing:
 - Ran DataCacheTest.SetReadOnly* in a loop for 1000 iterations

Change-Id: Id086c8be27200965c60f716b7303a0627b769281
---
M be/src/runtime/io/data-cache-test.cc
1 file changed, 7 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/26/20026/1
--
To view, visit http://gerrit.cloudera.org:8080/20026
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id086c8be27200965c60f716b7303a0627b769281
Gerrit-Change-Number: 20026
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <[email protected]>

Reply via email to