Mahesh Reddy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/20607 )

Change subject: KUDU-613: Introduce SLRU cache
......................................................................


Patch Set 15:

(6 comments)

http://gerrit.cloudera.org:8080/#/c/20607/14//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/20607/14//COMMIT_MSG@21
PS14, Line 21: Here are some benchmark numbers for SLRU cache:
             : Test case           | A
> Do I understand correctly that this is still a WIP patch, i.e. do you plan
It's no longer a WIP patch. The performance related tests are now added to this 
patch.


http://gerrit.cloudera.org:8080/#/c/20607/14/src/kudu/util/cache.h
File src/kudu/util/cache.h:

http://gerrit.cloudera.org:8080/#/c/20607/14/src/kudu/util/cache.h@228
PS14, Line 228:     // ensure this is safe, e.g. by destructing the entity that 
owned the
              :     // original metrics.
              :     kReset,
              :   };
              :   // Set the cache metrics to update corresponding counters 
accordingly.
              :   virtual void SetMetrics(std::unique_ptr<CacheMetrics> metrics,
              :                           ExistingMetricsPolicy metrics_policy) 
= 0;
              :
              :   // Sets probationary and protected segments metrics to update 
corresponding counters accordingly.
              :   //
              :   // An upgrade of one entry will increment the number of 
evictions from the probationary segment by
              :   // one and the number of insertions into the protected 
segment by one.
              :   //
              :   // A downgrade of one entry will increment the number of 
evictions from the protected segment by
              :   // one and the number of insertions into the probationary 
segment by one.
              :   //
              :   // To calculate the number of inserts for the SLRU cache, 
subtract the number of evictions
              :   // of the protected segment from the number of inserts of the 
probationary segment.
              :   //
> I'm not sure I understand the premise of introducing this method in the bas
This will be used in the block cache to set the metrics for both segments of 
the SLRU cache.


http://gerrit.cloudera.org:8080/#/c/20607/14/src/kudu/util/slru_cache.h
File src/kudu/util/slru_cache.h:

http://gerrit.cloudera.org:8080/#/c/20607/14/src/kudu/util/slru_cache.h@35
PS14, Line 35: Creates a new SLRU cache with 'probationary_capacity' being the 
capacity of
             : // the probationary segment in bytes, 'protected_capacity' being 
the
> Is the capacity in bytes, kBytes, number of entries in the cache?  It would
Done


http://gerrit.cloudera.org:8080/#/c/20607/14/src/kudu/util/slru_cache.h@40
PS14, Line 40: Cache
> Why not to return this as ShardedSLRUCache*?
The ShardedSLRUCache is local to the slru_cache.cc file. But for the logic in 
the patch that integrates this cache into the block_cache it's easier to return 
a Cache as the previous LRU implementation does too.


http://gerrit.cloudera.org:8080/#/c/20607/14/src/kudu/util/slru_cache.cc
File src/kudu/util/slru_cache.cc:

http://gerrit.cloudera.org:8080/#/c/20607/14/src/kudu/util/slru_cache.cc@62
PS14, Line 62: capacity()
> nit: capacity
Done


http://gerrit.cloudera.org:8080/#/c/20607/14/src/kudu/util/slru_cache.cc@131
PS14, Line 131: const size_t capa
> Could this be 'const'?
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I45531534a2049dd38c002f4dc7982df9fd46e0bb
Gerrit-Change-Number: 20607
Gerrit-PatchSet: 15
Gerrit-Owner: Mahesh Reddy <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <[email protected]>
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Thu, 02 May 2024 20:49:33 +0000
Gerrit-HasComments: Yes

Reply via email to