impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Kornacker (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4623: Enable file handle cache
Date Mon, 08 May 2017 15:37:19 GMT
Marcel Kornacker has posted comments on this change.

Change subject: IMPALA-4623: Enable file handle cache

Patch Set 4:

File be/src/runtime/

Line 1309:   string key = string(fname) + ":" + std::to_string(mtime);
you can get rid of dealing with strings here (and doing a bunch of allocations) entirely by
using something out of util/hash-util.h to compute the hash on fname and mtime separately
(no need to convert it to a string).

Line 1315:   // Get lock
that's obvious, no need to paraphrase a single statement (unless there's something subtle
going on).

Line 1318:   // Look up in the multimap (find range of values for key)
same here

Line 1326:     if (!elem->reference_count_) {
use explicit numeric comparisons, this isn't a bool (although maybe it should be).

Line 1331:       ImpaladMetrics::IO_MGR_NUM_CACHED_FILE_HANDLES->Increment(-1L);
hm, i'm not sure we should do that. it's still a cached file handle.

Line 1395:     if (p.size_ > p.capacity_) {
single line
File be/src/runtime/disk-io-mgr.h:

Line 273:        : fh_(fh), reference_count_(0) {}
single line

Line 276:       int reference_count_;
why refcount instead of just 'bool in_use' or something like that?

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe5ff60971dd653c3b6a0e13928cfa9fc59d078d
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Joe McDonnell <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Joe McDonnell <>
Gerrit-Reviewer: Marcel Kornacker <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-HasComments: Yes

View raw message