Todd Lipcon has submitted this change and it was merged. Change subject: KUDU-1054 (Part 1). Failover client scans on TABLET_NOT_FOUND ......................................................................
KUDU-1054 (Part 1). Failover client scans on TABLET_NOT_FOUND If a tablet is deleted from a tablet server, a client that attempts a scan on the tablet should fail over to another replica if possible. In addition, this patch allows for marking a tablet as stale in the meta cache. It replaces RemoteTablet::InvalidateCachedReplicas() with a MarkStale() method, since InvalidateCachedReplicas() was destructive and made it difficult to use in a multithreading context. By adding a "stale" flag to RemoteTablet, we allow users to access stale replicas until they are replaced (under a lock), which simplifies the multithreading behavior. Added a test for failing over client scans that uses tablet deletion and configuration change to cause a new node to become leader, which requires updating the tablet locations to scan from. Also added some test-related helper functions. Change-Id: Ic97714d82bd943beeb0350babc888b7e5c14ed57 Reviewed-on: http://gerrit.cloudera.org:8080/977 Reviewed-by: Todd Lipcon <[email protected]> Tested-by: Kudu Jenkins --- M src/kudu/client/client-test-util.cc M src/kudu/client/client-test-util.h M src/kudu/client/client-test.cc M src/kudu/client/meta_cache.cc M src/kudu/client/meta_cache.h M src/kudu/client/scanner-internal.cc M src/kudu/integration-tests/CMakeLists.txt A src/kudu/integration-tests/client_failover-itest.cc M src/kudu/integration-tests/external_mini_cluster_fs_inspector.cc M src/kudu/integration-tests/external_mini_cluster_fs_inspector.h 10 files changed, 238 insertions(+), 30 deletions(-) Approvals: Todd Lipcon: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/977 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic97714d82bd943beeb0350babc888b7e5c14ed57 Gerrit-PatchSet: 8 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Mike Percy <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <[email protected]> Gerrit-Reviewer: Todd Lipcon <[email protected]>
