Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/19931 )

Change subject: KUDU-3476: Make replica placement range and table aware
......................................................................


Patch Set 12:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/19931/10/src/kudu/master/ts_descriptor.cc
File src/kudu/master/ts_descriptor.cc:

http://gerrit.cloudera.org:8080/#/c/19931/10/src/kudu/master/ts_descriptor.cc@214
PS10, Line 214:   const double kHalflifeSecs = 
FLAGS_tserver_last_replica_creations_halflife_ms / 1000;
              :   const MonoTime now = MonoTime::Now();
              :   // If map for the table or range hasn't been initialized yet, 
use init_time_ as last decay.
              :   MonoTime last_decay =
              :       last_replica_decay_by_range_.find(table_id) == 
last_replica_decay_by_range_.end() ||
              :       
last_replica_decay_by_range_[table_id].first.find(range_start_key) ==
              :       last_replica_decay_by_range_[table_id].first.end() ?
              :       init_time_ : 
last_replica_decay_by_range_[table_id].first[range_start_key];
              :   double secs_since_last_decay = (now - last_decay).To
> The purpose of decay in this context is to eventually "reset" these values
All right, if recentReplicaCreation is increasing then without decay it shows 
the exact number of placed replicas since the prior update based on the stats 
reported.

We are interested to know the total number of tablet replicas, so why not 
simply sum up the numbers reported by the prior tablet report, and the number 
of replicas placed since then, and reset recentReplicaCreation to 0 when next 
tablet report arrives?

IIUC, the decay and recency-related counts made sense in case of power-of-two 
choice algorithm.  The idea was avoid  overloading a fresh new (empty) tablet 
server with all the new replicas for a table (that would happen if looking only 
at the total count of tablet replicas at the tablet server).  But since the new 
algorithm takes into account per-table distribution among tablet servers, I 
don't see why to keep decay and other recency-related stuff now.

What am I missing here?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9caeb8d5547e946bfeb152a99e1ec034c3fa0a0f
Gerrit-Change-Number: 19931
Gerrit-PatchSet: 12
Gerrit-Owner: Mahesh Reddy <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Ashwani Raina <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <[email protected]>
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Reviewer: Zoltan Chovan <[email protected]>
Gerrit-Reviewer: Ádám Bakai <[email protected]>
Gerrit-Comment-Date: Fri, 30 Jun 2023 01:10:01 +0000
Gerrit-HasComments: Yes

Reply via email to