Gabriella Lotz has posted comments on this change. ( http://gerrit.cloudera.org:8080/23702 )
Change subject: [rest] Return HTTP 503 for non-leader masters ...................................................................... Patch Set 1: (1 comment) http://gerrit.cloudera.org:8080/#/c/23702/1//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/23702/1//COMMIT_MSG@9 PS1, Line 9: HTTP 503 (Service Unavailable) > Should this be 307 (Temporary Redirect) ? I chose HTTP 503 instead of 307 for a couple of reasons. First, 503 more accurately describes what's happening here: the service exists and is healthy, but this particular master can't handle the request right now because it's not the leader. It's a temporary condition that could change during leader elections. Second, returning 503 forces clients to explicitly discover the current leader via /api/v1/leader and make a fresh, properly authenticated request. This is important in multi-master setups, especially with SPNEGO authentication, where automatic redirects can break the authentication flow. We could optionally include the leader's location in the JSON error response as a hint, but I'd avoid using 307 since it tries to handle the redirect automatically, which doesn't play well with authentication in our setup. -- 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: comment Gerrit-Change-Id: I62fa177f93b40daae542000aff64b6b432e38467 Gerrit-Change-Number: 23702 Gerrit-PatchSet: 1 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]> Gerrit-Comment-Date: Fri, 21 Nov 2025 14:52:59 +0000 Gerrit-HasComments: Yes
