Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/6957
to look at the new patch set (#3).
Change subject: WIP: Ensure ConsensusMetadata exists, even for tombstoned
tablets
......................................................................
WIP: Ensure ConsensusMetadata exists, even for tombstoned tablets
Adds a TABLET_DATA_FRESH data state and a NOT_INITIALIZED run state.
The ConsensusMetadata file is required for tombstoned voting as the
record of a replica's votes.
Changes:
1) Add an additional on-disk data state (TABLET_DATA_FRESH) to allow us
to identify when we crashed between writing the superblock and the
ConsensusMetadata file. If a tablet is in that state then it has
never voted so is legal to fully delete instead of attempt to recover
at startup time.
2) Add an additional run state to TabletReplica (NOT_INITIALIZED) for
lifecycle validation purposes.
3) Refactor TabletReplica to create a RaftConsensus instance at Init()
time. This will allow us to incorporate tombstoned voting later by
allowing RaftConsensus to be accessible from a TabletReplica that
comes up fresh in the TABLET_DATA_TOMBSTONED state.
Tests:
* Adds a test for TABLET_DATA_FRESH crash recovery behavior at tablet
creation time: TsRecoveryITest.TestCrashBeforeWritingConsensusMetadata
* Adds a tablet copy fault test as well:
TabletCopyITest.TestTabletCopyFresh
TODO:
* TabletCopyITest.TestTabletCopyFresh is currently failing.
Change-Id: Ia27a091d27b3996d37009d5ec866e744f9608388
---
M src/kudu/integration-tests/tablet_copy-itest.cc
M src/kudu/integration-tests/ts_recovery-itest.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/metadata.proto
M src/kudu/tablet/tablet_replica-test.cc
M src/kudu/tablet/tablet_replica.cc
M src/kudu/tablet/tablet_replica.h
M src/kudu/tserver/tablet_copy_client.cc
M src/kudu/tserver/tablet_copy_client.h
M src/kudu/tserver/tablet_copy_source_session-test.cc
M src/kudu/tserver/ts_tablet_manager.cc
M src/kudu/tserver/ts_tablet_manager.h
12 files changed, 251 insertions(+), 51 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/57/6957/3
--
To view, visit http://gerrit.cloudera.org:8080/6957
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia27a091d27b3996d37009d5ec866e744f9608388
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Mike Percy <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: David Ribeiro Alves <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <[email protected]>