KUDU-1328: crash when remote bootstrap session races with tablet deletion

An innocuous log statement introduced in commit b841512 can cause a crash if
a remote bootstrap request for a particular tablet arrives as the tserver
deletes that tablet.

I'm still working on an integration test that faithfully reproduces the
crash, but until then, here's a low-risk fix for the log statement that can
go into 0.7.

Change-Id: I6a487ba4f37383479170519866509f3f3d88dc5d
Reviewed-on: http://gerrit.cloudera.org:8080/2193
Tested-by: Kudu Jenkins
Reviewed-by: Jean-Daniel Cryans
(cherry picked from commit 7b1ea74ee7ed617a78fdc807ac41505fcea64535)
Reviewed-on: http://gerrit.cloudera.org:8080/2196
diff --git a/src/kudu/tserver/remote_bootstrap_session.cc b/src/kudu/tserver/remote_bootstrap_session.cc
index 2d2aced..3a7cae4 100644
--- a/src/kudu/tserver/remote_bootstrap_session.cc
+++ b/src/kudu/tserver/remote_bootstrap_session.cc
@@ -90,9 +90,6 @@
   // All subsequent requests should reuse the opened blocks.
   vector<BlockIdPB> data_blocks;
   TabletMetadata::CollectBlockIdPBs(tablet_superblock_, &data_blocks);
-  LOG(INFO) << "T " << tablet_peer_->tablet_id()
-            << " P " << tablet_peer_->consensus()->peer_uuid()
-            << ": Remote bootstrap: Opening " << data_blocks.size() << " blocks";
   for (const BlockIdPB& block_id : data_blocks) {
     VLOG(1) << "Opening block " << block_id.DebugString();
     RETURN_NOT_OK(OpenBlockUnlocked(BlockId::FromPB(block_id)));
@@ -109,7 +106,6 @@
   for (const scoped_refptr<ReadableLogSegment>& segment : log_segments_) {
     RETURN_NOT_OK(OpenLogSegmentUnlocked(segment->header().sequence_number()));
   }
-  LOG(INFO) << "Got snapshot of " << log_segments_.size() << " log segments";
 
   // Look up the committed consensus state.
   // We do this after snapshotting the log to avoid a scenario where the latest
@@ -132,6 +128,9 @@
   RETURN_NOT_OK(tablet_peer_->log_anchor_registry()->UpdateRegistration(
       last_logged_opid.index(), anchor_owner_token, &log_anchor_));
 
+  LOG(INFO) << Substitute(
+      "T $0 P $1: Remote bootstrap: opened $2 blocks and $3 log segments",
+      tablet_id, consensus->peer_uuid(), data_blocks.size(), log_segments_.size());
   return Status::OK();
 }