kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject incubator-kudu git commit: KUDU-1328: crash when remote bootstrap session races with tablet deletion
Date Wed, 17 Feb 2016 01:55:43 GMT
Repository: incubator-kudu
Updated Branches:
  refs/heads/master a2a2f3f71 -> 7b1ea74ee


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


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

Branch: refs/heads/master
Commit: 7b1ea74ee7ed617a78fdc807ac41505fcea64535
Parents: a2a2f3f
Author: Adar Dembo <adar@cloudera.com>
Authored: Tue Feb 16 16:37:20 2016 -0800
Committer: Jean-Daniel Cryans <jdcryans@gerrit.cloudera.org>
Committed: Wed Feb 17 01:34:07 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/7b1ea74e/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();
 }
 


Mime
View raw message