You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by jd...@apache.org on 2016/02/17 02:55:40 UTC

incubator-kudu git commit: KUDU-1328: crash when remote bootstrap session races with tablet deletion

Repository: incubator-kudu
Updated Branches:
  refs/heads/branch-0.7.0 70b6ff1a7 -> f9971b399


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


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/f9971b39
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/f9971b39
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/f9971b39

Branch: refs/heads/branch-0.7.0
Commit: f9971b3990bb9b687ad7e64a73cc3aedbcc694e7
Parents: 70b6ff1
Author: Adar Dembo <ad...@cloudera.com>
Authored: Tue Feb 16 16:37:20 2016 -0800
Committer: Jean-Daniel Cryans <jd...@gerrit.cloudera.org>
Committed: Wed Feb 17 01:55:14 2016 +0000

----------------------------------------------------------------------
 src/kudu/tserver/remote_bootstrap_session.cc | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/f9971b39/src/kudu/tserver/remote_bootstrap_session.cc
----------------------------------------------------------------------
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 @@ Status RemoteBootstrapSession::Init() {
   // 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 @@ Status RemoteBootstrapSession::Init() {
   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 @@ Status RemoteBootstrapSession::Init() {
   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();
 }