Joe McDonnell has submitted this change and it was merged. ( 
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
Reviewed-on: http://gerrit.cloudera.org:8080/20026
Reviewed-by: Joe McDonnell <[email protected]>
Tested-by: Joe McDonnell <[email protected]>
---
M be/src/runtime/io/data-cache-test.cc
1 file changed, 7 insertions(+), 7 deletions(-)

Approvals:
  Joe McDonnell: Looks good to me, approved; Verified

--
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: merged
Gerrit-Change-Id: Id086c8be27200965c60f716b7303a0627b769281
Gerrit-Change-Number: 20026
Gerrit-PatchSet: 6
Gerrit-Owner: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>

Reply via email to