Todd Lipcon has submitted this change and it was merged.

Change subject: KUDU-1590. Fix cache-test failure on some machines
......................................................................


KUDU-1590. Fix cache-test failure on some machines

CacheTest.TestEviction was failing on some machines, depending on the
number of cores. This is due to bfb6f2338cd57a1c7f8405c97b66c3050c8920ff
which changed the cache to determine the number of cache shards based on
the core count.

The number of shards changed the eviction behavior because the sharded
cache is actually only *approximately* LRU. Each shard itself is LRU,
but entries in different shards will not evict each other. So, with more
shards, the test wasn't evicting the element as expected.

The fix simply increases the amount of cache churn caused by the test so
that the eviction proceeds as expected.

Change-Id: I77362fc67ab5ba8420c21d1e3fb5c28ff9bfab1b
Reviewed-on: http://gerrit.cloudera.org:8080/4321
Reviewed-by: Adar Dembo <a...@cloudera.com>
Tested-by: Kudu Jenkins
---
M src/kudu/util/cache-test.cc
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Adar Dembo: Looks good to me, approved
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/4321
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I77362fc67ab5ba8420c21d1e3fb5c28ff9bfab1b
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>

Reply via email to