Alexey Serbin has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/14881 )

Change subject: [master] KUDU-3017 clean-up SysCatalogTable::SetupTablet()
......................................................................

[master] KUDU-3017 clean-up SysCatalogTable::SetupTablet()

If master fails to replay orphaned operations from the WAL during
the bootstrap, it crashes at the system tablet's state check
(the 'orphaned operations' are REPLICATE messages which are in the WAL
with no accompanying COMMIT):

    F1206 01:32:15.488359 1324967 tablet_replica.cc:138] Check failed: state_ 
== SHUTDOWN || state_ == FAILED TabletReplica not fully shut down. State: 
BOOTSTRAPPING

This patch addresses the issue, so master would not crash at the tablet
state consistency CHECK() under such conditions.  Instead, now it
reports corresponding error and crashes at the higher level
in master_main.cc.  With this patch, it's easier to attribute
a failure to the root cause by looking into the master's log.

I didn't add any tests: the replay of the orphaned WAL transactions
during bootstrap has pretty good coverage already.

Change-Id: I6adfd7f74fdd2e05e04f6418cbf9bb86cad6465a
Reviewed-on: http://gerrit.cloudera.org:8080/14881
Tested-by: Kudu Jenkins
Reviewed-by: Andrew Wong <[email protected]>
---
M src/kudu/kserver/kserver.cc
M src/kudu/master/master_main.cc
M src/kudu/master/sys_catalog.cc
3 files changed, 47 insertions(+), 41 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Andrew Wong: Looks good to me, approved

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6adfd7f74fdd2e05e04f6418cbf9bb86cad6465a
Gerrit-Change-Number: 14881
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)

Reply via email to