Adar Dembo has posted comments on this change.

Change subject: util: add file cache
......................................................................


Patch Set 10:

(5 comments)

http://gerrit.cloudera.org:8080/#/c/5146/10/src/kudu/util/file_cache-test.cc
File src/kudu/util/file_cache-test.cc:

Line 48: class FileCacheTest : public KuduTest {
> Consider adding a test of RunDescriptorExpiry.
That's already tested indirectly in AssertFdsAndDescriptors(). Since 
NumDescriptorsForTests includes expired weak pointers, we have to 
AssertEventually() that the thread removes them (and it does).


http://gerrit.cloudera.org:8080/#/c/5146/10/src/kudu/util/file_cache.cc
File src/kudu/util/file_cache.cc:

Line 41: DEFINE_int32(file_cache_expiry_period_ms, 1000,
> This seems pretty aggressive.  What's the downside to a longer expiry like 
I don't mind increasing it. I was mostly concerned about pathological cases 
like a tight loop that does nothing but open and close descriptors, but maybe 
that's paranoid.

Will use a minute.


Line 389: FileCache<FileType>::FileCache(const string& cache_name,
> Maybe I'm missing it, but where are you actually creating the thread?  Ther
It's in the Init() function. To be faithful to the kudu::Thread class, we 
should return the Status of a failed Thread::Create(), which means it can't 
happen in the cache constructor.


http://gerrit.cloudera.org:8080/#/c/5146/10/src/kudu/util/file_cache.h
File src/kudu/util/file_cache.h:

Line 103:   FileCache(const std::string& cache_name,
> why this change?
The constructor wasn't actually moving cache_name, so passing by cref elides 
one copy.


PS10, Line 154:  descirptors
> descriptors
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I26d02f71b0a9644de0b669875941adae5f426345
Gerrit-PatchSet: 10
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <danburk...@apache.org>
Gerrit-Reviewer: Dinesh Bhat <din...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-HasComments: Yes

Reply via email to