Mike Percy has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/12840 )
Change subject: tablet_service: improve error handling specificity ...................................................................... tablet_service: improve error handling specificity The error handling in TabletServiceImpl::HandleNewScanRequest() was convoluted. It's still not particularly inspired, but this patch makes several clarity and maintainability improvements: * Instead of making it the default error returned from HandleNewScanRequest(), localize the return of TabletServerErrorPB::MISMATCHED_SCHEMA to where Iterator::Init() returns an InvalidArgument, since that comes from a GetMappedReadProjection() failure. * Use an INVALID_SCAN_SPEC error for the case where the user specifies an unrecognized order mode, which is consistent with when the user specifies an unknown read mode or when the user specifies order mode ORDERED without specifying a snapshot scan. Also, update the comments in the .proto file to reflect the current usage. * Localize assignment of TabletServerErrorPB::Code as much as possible in HandleNewScanRequest() by plumbing an `error_code` pointer into HandleScanAtSnapshot() so that errors in that method can be specific to the type of problem observed. Change-Id: I1e6f7b01336e78ea8f37cb17b2c4485138e23581 Reviewed-on: http://gerrit.cloudera.org:8080/12840 Tested-by: Kudu Jenkins Reviewed-by: Adar Dembo <[email protected]> --- M src/kudu/tools/ksck_remote-test.cc M src/kudu/tserver/tablet_server-test-base.cc M src/kudu/tserver/tablet_server-test-base.h M src/kudu/tserver/tablet_server-test.cc M src/kudu/tserver/tablet_service.cc M src/kudu/tserver/tablet_service.h M src/kudu/tserver/tserver.proto 7 files changed, 81 insertions(+), 59 deletions(-) Approvals: Kudu Jenkins: Verified Adar Dembo: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/12840 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I1e6f7b01336e78ea8f37cb17b2c4485138e23581 Gerrit-Change-Number: 12840 Gerrit-PatchSet: 5 Gerrit-Owner: Mike Percy <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Mike Percy <[email protected]>
