[tablet] clean-up on Tablet::UpdateLastReadTime()

Tablet::UpdateLastReadTime() was marked 'const' while it wasn't so
semantically, but the comment in the header file was claiming it's
necessary.  However, it turned out that's not so as of now, and this
patch reduces the confusion.  I also took the liberty to make formatting
changes in the constructor to comply with the C++ code style guide.

This patch doesn't contain any functional changes.

This is a follow-up to ca957fb86736b1e07b18d80fdfa4e41c191e7072.

Change-Id: Iaf204d50bb3ee470790cefae983e6fb7b5a21c98
Reviewed-on: http://gerrit.cloudera.org:8080/19280
Tested-by: Kudu Jenkins
Reviewed-by: Yifan Zhang <chinazhangyifan@163.com>
diff --git a/src/kudu/tablet/tablet.cc b/src/kudu/tablet/tablet.cc
index 592c7c8..e60443f 100644
--- a/src/kudu/tablet/tablet.cc
+++ b/src/kudu/tablet/tablet.cc
@@ -271,23 +271,23 @@
                shared_ptr<MemTracker> parent_mem_tracker,
                MetricRegistry* metric_registry,
                scoped_refptr<LogAnchorRegistry> log_anchor_registry)
-  : key_schema_(metadata->schema()->CreateKeyProjection()),
-    metadata_(std::move(metadata)),
-    log_anchor_registry_(std::move(log_anchor_registry)),
-    mem_trackers_(tablet_id(), std::move(parent_mem_tracker)),
-    next_mrs_id_(0),
-    clock_(clock),
-    txn_participant_(metadata_),
-    rowsets_flush_sem_(1),
-    state_(kInitialized),
-    last_write_time_(MonoTime::Now()),
-    last_read_time_(MonoTime::Now()),
-    last_update_workload_stats_time_(MonoTime::Now()),
-    last_scans_started_(0),
-    last_rows_mutated_(0),
-    last_read_score_(0.0),
-    last_write_score_(0.0) {
-      CHECK(schema()->has_column_ids());
+    : key_schema_(metadata->schema()->CreateKeyProjection()),
+      metadata_(std::move(metadata)),
+      log_anchor_registry_(std::move(log_anchor_registry)),
+      mem_trackers_(tablet_id(), std::move(parent_mem_tracker)),
+      next_mrs_id_(0),
+      clock_(clock),
+      txn_participant_(metadata_),
+      rowsets_flush_sem_(1),
+      state_(kInitialized),
+      last_read_time_(MonoTime::Now()),
+      last_write_time_(last_read_time_),
+      last_update_workload_stats_time_(last_read_time_),
+      last_scans_started_(0),
+      last_rows_mutated_(0),
+      last_read_score_(0.0),
+      last_write_score_(0.0) {
+  CHECK(schema()->has_column_ids());
   compaction_policy_.reset(CreateCompactionPolicy());
 
   if (metric_registry) {
@@ -2410,7 +2410,7 @@
   return static_cast<uint64_t>((MonoTime::Now() - last_read_time_).ToSeconds());
 }
 
-void Tablet::UpdateLastReadTime() const {
+void Tablet::UpdateLastReadTime() {
   std::lock_guard<rw_spinlock> l(last_rw_time_lock_);
   last_read_time_ = MonoTime::Now();
 }
diff --git a/src/kudu/tablet/tablet.h b/src/kudu/tablet/tablet.h
index 607d5ae..47ca3b5 100644
--- a/src/kudu/tablet/tablet.h
+++ b/src/kudu/tablet/tablet.h
@@ -522,9 +522,7 @@
                      std::vector<KeyRange>* ranges);
 
   // Update the last read operation timestamp.
-  // NOTE: It's a const function, because we have to call it in Iterator, where Tablet is a const
-  // variable there.
-  void UpdateLastReadTime() const;
+  void UpdateLastReadTime();
 
   // Collect and update recent workload statistics for the tablet.
   // Return the current workload score of the tablet.
@@ -847,8 +845,8 @@
 
   // Lock protecting access to 'last_write_time_' and 'last_read_time_'.
   mutable rw_spinlock last_rw_time_lock_;
+  MonoTime last_read_time_;
   MonoTime last_write_time_;
-  mutable MonoTime last_read_time_;
 
   // NOTE: it's important that this is the first member to be destructed. This
   // ensures we do not attempt to collect metrics while calling the destructor.