Adar Dembo has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/12776 )

Change subject: [util] separate generalized CacheMetrics
......................................................................


Patch Set 2:

(1 comment)

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

http://gerrit.cloudera.org:8080/#/c/12776/2/src/kudu/util/file_cache.cc@465
PS2, Line 465:     unique_ptr<BlockCacheMetrics> metrics(new 
BlockCacheMetrics(entity));
> I'm not sure I follow, in the case before, doesn't this still instantiate o
It does, but each metric inside a CacheMetrics instance is still bound to just 
one metric prototype (defined statically in cache_metrics.cc). I think this 
means that if you e.g. instantiate both a FileCache and a BlockCache, you'll 
wind up with two LRUCache instances, each with its own CacheMetrics, but only 
one actual set of metrics. The nitty gritty details: the ##Instantiate calls 
made by the MINIT and GINIT macros in cache_metrics.cc lead to 
FindOrCreateCounter() and FindOrCreateGauge() calls; presumably the second time 
you call them, you'll wind up "finding" the existing counter/gauge rather than 
creating new ones.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic77b937e23c600763ec987a96ce98a47ad95ee18
Gerrit-Change-Number: 12776
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Hao Hao <[email protected]>
Gerrit-Comment-Date: Tue, 19 Mar 2019 18:12:08 +0000
Gerrit-HasComments: Yes

Reply via email to