Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpc: reset transport version via reconnect_transport #5520

Merged
merged 5 commits into from
Jul 21, 2022

Commits on Jul 20, 2022

  1. rpc: set reply version on error

    When an error occurs while processing a request (e.g. a handler throws
    or the server receives an unsupported api request) a default initialized
    netbuf is created to hold the error and is sent back to the client.
    
    Prior to this commit the header included v0 as the version for such
    error replies. Since the error may be returned to a client whose
    transport was upgraded to v2 a protocol violation error would be logged
    by the client.
    
    This commit matches the reply version to the request version for error
    replies under the reasonable assumption that (1) the rpc header is
    compatibile across transport versions and (2) the errors contain no
    decodable payloads.
    
    Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
    dotnwat committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    75d5040 View commit details
    Browse the repository at this point in the history
  2. rpc: disambiguate timeout errors from other exceptions

    Other exceptions log messages when returning timeout errors to the
    client. However, an actual timeout exception didn't log so an observer
    would have to deduce exactly what happened based on an omission in the
    logs.
    
    Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
    dotnwat committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    2dcc1b9 View commit details
    Browse the repository at this point in the history
  3. rpc: privatize internal apis

    Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
    dotnwat committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    dfe2e13 View commit details
    Browse the repository at this point in the history
  4. rpc: reset transport version on connect

    This is needed for the case in which a peer on the other end of a
    reconnect_transport is downgraded. unless we reset the version on
    reconnect then we'll get a policy violation if the peer responds
    with a lower version than the transport had been upgraded to.
    
    Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
    dotnwat committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    ddbf0cc View commit details
    Browse the repository at this point in the history
  5. rpc: log policy violations at error level

    Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
    dotnwat committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    f3c6b5f View commit details
    Browse the repository at this point in the history