You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Adar Dembo (Code Review)" <ge...@cloudera.org> on 2019/11/12 08:09:40 UTC

[kudu-CR] [nvm cache] remove allocation retry logic

Adar Dembo has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/14498 )

Change subject: [nvm_cache] remove allocation retry logic
......................................................................

[nvm_cache] remove allocation retry logic

This patch addresses the issue with allocation retry logic
in NvmLRUCache::AllocateAndRetry(), removing it altogether.

The idea of removing some entries from the cache and trying again
in case of allocation failure is:
  * not aligned with DRAM-based cache behavior
  * not robust enough

First, from the conceptual point, DRAM block cache doesn't retry
in such cases (i.e. in the sense that new[] may raise an exception and
crash Kudu if it runs out of memory).  Second, there is no guarantee
there would be some entries in the cache not referenced from anywhere
else.  Third, since the block cache performs clean-up of the cache
on its own by running a periodic grooming task, the value of such
de-allocation attempt is greatly diminished.

This is a follow-up to 0897b6b0e47a64c0cf30c956c020371258f2bacd.

Change-Id: I5671b2413160ca10b7e41c38d7e6164efdccfb8b
Reviewed-on: http://gerrit.cloudera.org:8080/14498
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Kudu Jenkins
---
M src/kudu/util/nvm_cache.cc
1 file changed, 5 insertions(+), 40 deletions(-)

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

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I5671b2413160ca10b7e41c38d7e6164efdccfb8b
Gerrit-Change-Number: 14498
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: ye yuqiang <yu...@intel.com>