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 10: (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: // 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).ToSeconds(); : recent_replicas_by_range_[table_id].first[range_start_key] *= : pow(0.5, secs_since_last_decay / kHalflifeSecs); > Ah, it seems the piece I was missing was the fact that tablet servers aren' However, all this decay-style stuff means strange side-effects are possible if tablet replicas are created quite fast and reported just next TS heartbeat. IIUC, that means that the algorithm sometimes sees almost two times more replicas created at a particular tablet server, no? Could this be a factor to eventually end up with a non-optimal distribution of replicas if multiple table ranges are created in quick succession? Did you think of adding a test-case to verify that edge case? If such an issue exists, I guess we could address that in a separate changelist. I'm totally fine with the current approach, given we know about that side-effect (if it's there indeed), and willing to address that later on. Thanks! -- 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: 10 Gerrit-Owner: Mahesh Reddy <mre...@cloudera.com> Gerrit-Reviewer: Abhishek Chennaka <achenn...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <ale...@apache.org> Gerrit-Reviewer: Ashwani Raina <ara...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Mahesh Reddy <mre...@cloudera.com> Gerrit-Reviewer: Marton Greber <greber...@gmail.com> Gerrit-Reviewer: Zoltan Chovan <zcho...@cloudera.com> Gerrit-Reviewer: Ádám Bakai <aba...@cloudera.com> Gerrit-Comment-Date: Fri, 30 Jun 2023 01:42:24 +0000 Gerrit-HasComments: Yes