You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2016/05/05 00:42:15 UTC

[kudu-CR] Refactor cache interface to handle allocation of values and keys together

Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/2957

to look at the new patch set (#2).

Change subject: Refactor cache interface to handle allocation of values and keys together
......................................................................

Refactor cache interface to handle allocation of values and keys together

This changes the cache interface so that the cache itself now
allocates the LRUHandle, the key, and the value all together.
The insertion process is now "two-phase": first, we allocate a new
cache entry with the appropriate size, then fill in the value,
and then we pass the entry back to the cache for insertion.

Because the cache now owns all of the memory, the "deleter"
callback is no longer necessary to free cache values. Instead,
it's just an "eviction" callback, since we still need to
take action on eviction for the code cache (and for tests).

The point of this refactor is to enable the persistent NVM cache,
which needs to allocate LRUHandles on the heap, but the keys
and values in persistent memory.

Change-Id: Iedeb24c0233bf062a0a6450a9fd3a7c57499144f
---
M src/kudu/cfile/block_cache-test.cc
M src/kudu/cfile/block_cache.cc
M src/kudu/cfile/block_cache.h
M src/kudu/cfile/block_handle.h
M src/kudu/cfile/cfile_reader.cc
M src/kudu/codegen/code_cache.cc
M src/kudu/codegen/code_cache.h
M src/kudu/util/cache-test.cc
M src/kudu/util/cache.cc
M src/kudu/util/cache.h
M src/kudu/util/nvm_cache.cc
11 files changed, 428 insertions(+), 361 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/57/2957/2
-- 
To view, visit http://gerrit.cloudera.org:8080/2957
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iedeb24c0233bf062a0a6450a9fd3a7c57499144f
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>