Marton Greber has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/23702 )
Change subject: [rest] Return HTTP 503 for non-leader masters ...................................................................... [rest] Return HTTP 503 for non-leader masters Non-leader masters now return HTTP 503 (Service Unavailable) instead of HTTP 500 (Internal Server Error) when handling REST API requests. This change provides more semantically correct HTTP status codes: - HTTP 500 suggests an internal malfunction or unexpected error - HTTP 503 indicates the service exists but is temporarily unavailable at this particular server instance The non-leader master is functioning correctly; it simply cannot service the request because it's not in the leader role. This is a temporary condition that can change during leader elections, making 503 the appropriate status code. Change-Id: I62fa177f93b40daae542000aff64b6b432e38467 Reviewed-on: http://gerrit.cloudera.org:8080/23702 Reviewed-by: Zoltan Chovan <[email protected]> Reviewed-by: Marton Greber <[email protected]> Tested-by: Marton Greber <[email protected]> --- M src/kudu/master/rest_catalog_path_handlers.cc M src/kudu/master/spnego_rest_catalog-test.cc 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Zoltan Chovan: Looks good to me, approved Marton Greber: Looks good to me, but someone else must approve; Verified -- To view, visit http://gerrit.cloudera.org:8080/23702 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I62fa177f93b40daae542000aff64b6b432e38467 Gerrit-Change-Number: 23702 Gerrit-PatchSet: 2 Gerrit-Owner: Gabriella Lotz <[email protected]> Gerrit-Reviewer: Ashwani Raina <[email protected]> Gerrit-Reviewer: Gabriella Lotz <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Marton Greber <[email protected]> Gerrit-Reviewer: Zoltan Chovan <[email protected]>
