Ashwani Raina 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) > (1 comment) > > Ideally I think HTTP 421 (Misdirected Request) [1] would be even > more suitable. But at this point i'm not sure if that causes even > more confusion. > I understand that Service Unavailable interpreted as "temporarily > can't handle this" fits this picture, and with proper message this > look OK to me. > > [1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/421 HTTP 421 sounds like a better code. 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) > Just for context: in previous review rounds this has been investigated. Yes Thanks for the explanation! Maybe I am missing something. My understanding is that if a passing curl request works with secured cluster, it should work with 307 response as well by curl automatically forwarding the authorisation header to new location. However, it seems ok to send just the error code (503) to depict whether it's a leader or not, as the function name suggests. Moreover, automatic redirection to leader master may not be appropriate if that is not the requirement here. -- 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 15:51:02 +0000 Gerrit-HasComments: Yes
