Yingchun Lai has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21300 )

Change subject: [metrics] Add tablet level metrics for alter schema op time
......................................................................


Patch Set 2:

(7 comments)

http://gerrit.cloudera.org:8080/#/c/21300/2/src/kudu/tablet/ops/alter_schema_op.cc
File src/kudu/tablet/ops/alter_schema_op.cc:

http://gerrit.cloudera.org:8080/#/c/21300/2/src/kudu/tablet/ops/alter_schema_op.cc@179
PS2, Line 179:     uint64_t op_duration_usec = (MonoTime::Now() - 
start_time_).ToMicroseconds();
1. Should this metric also statistics the duraction when the ops aborted (line 
159)?
2. How aboud using ScopedLatencyMetric to simplify the code?


http://gerrit.cloudera.org:8080/#/c/21300/2/src/kudu/tablet/tablet_metrics.cc
File src/kudu/tablet/tablet_metrics.cc:

http://gerrit.cloudera.org:8080/#/c/21300/2/src/kudu/tablet/tablet_metrics.cc@227
PS2, Line 227:
nit: Leave one blank line is enough.


http://gerrit.cloudera.org:8080/#/c/21300/2/src/kudu/tablet/tablet_replica-test.cc
File src/kudu/tablet/tablet_replica-test.cc:

http://gerrit.cloudera.org:8080/#/c/21300/2/src/kudu/tablet/tablet_replica-test.cc@267
PS2, Line 267:   SchemaPB orig_schema_pb;
Is 'orig_schema_pb' necessary?


http://gerrit.cloudera.org:8080/#/c/21300/2/src/kudu/tablet/tablet_replica-test.cc@272
PS2, Line 272:   scoped_refptr<Histogram> alter_schema_duration =
             :     
METRIC_alter_schema_duration.Instantiate(tablet_replica_->tablet()->GetMetricEntity());
Is it possible to get the metric via 
tablet_replica_->tablet()->metrics()->alter_schema_duration?


http://gerrit.cloudera.org:8080/#/c/21300/2/src/kudu/tablet/tablet_replica-test.cc@274
PS2, Line 274:   auto before_cnt = alter_schema_duration->TotalCount();
nit: add 'const'


http://gerrit.cloudera.org:8080/#/c/21300/2/src/kudu/tablet/tablet_replica-test.cc@279
PS2, Line 279:   Schema new_client_schema = builder.BuildWithoutIds();
Is 'new_client_schema' necessary?


http://gerrit.cloudera.org:8080/#/c/21300/2/src/kudu/tablet/tablet_replica-test.cc@285
PS2, Line 285:   LOG(INFO) << "Tablet alter schema histogram";
             :   
alter_schema_duration->histogram()->DumpHumanReadable(&LOG(INFO));
Is this debugging purpose only? Remove it if not necessary, check the metric 
changes in line 284 is enough.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I034fc3141349a940ee8aaac22ca90e1948fc7a6a
Gerrit-Change-Number: 21300
Gerrit-PatchSet: 2
Gerrit-Owner: KeDeng <kdeng...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <laiyingc...@apache.org>
Gerrit-Comment-Date: Thu, 18 Apr 2024 03:09:41 +0000
Gerrit-HasComments: Yes

Reply via email to