Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [tablet] Add new metrics to indicate the last read/write time ...................................................................... Patch Set 6: (4 comments) http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.h File src/kudu/tablet/tablet.h: http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.h@663 PS5, Line 663: // on this tablet. uint64_t::max is returned if this tablet hasn't : // been read > Recency of writes is maintained across all replicas because the write metri When use the metrics, we will merge different replicas' metric of the same tablet(merged by MAX or MIN type), so we can get the tablet's last write and scan time. We can get table's last write and scan time by the same way. I think 0 for these cases might be confused too. Suppose there are thousands of tablets haven't been wrriten since last restart, we can't distinguish them from recency wrriten ones, and also, can't take any operations on them, like move them to HDFS. If we set it to uint64_t::max, at least we can use a special value to filter them, and the special value is reasonable to set to the last tserver restart time. http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.cc File src/kudu/tablet/tablet.cc: http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.cc@169 PS5, Line 169: since the last read operation " > nit: "since the last new scan" would be more accurate. We could have create I want to messure the time since access indeed. Moved the metric into iterator now, it would be more accurate. http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.cc@171 PS5, Line 171: since the tablet was created or the most rec > grammar nit: "since the tablet was created or the most recent tserver resta Done http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.cc@177 PS5, Line 177: is tabl > grammar nit: "written to" Done -- To view, visit http://gerrit.cloudera.org:8080/14912 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d Gerrit-Change-Number: 14912 Gerrit-PatchSet: 6 Gerrit-Owner: Yingchun Lai <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Yingchun Lai <[email protected]> Gerrit-Comment-Date: Thu, 19 Dec 2019 05:41:45 +0000 Gerrit-HasComments: Yes
